Fallback to sized integer types on MSVC if stdint.h is not available

This commit is contained in:
vitaut 2015-12-18 07:20:05 -08:00
parent 016714c57b
commit 0629d76bb0

View File

@ -28,14 +28,6 @@
#ifndef FMT_FORMAT_H_
#define FMT_FORMAT_H_
#if defined _MSC_VER && _MSC_VER <= 1500
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef long long intmax_t;
#else
#include <stdint.h>
#endif
#include <cassert>
#include <cmath>
#include <cstdio>
@ -64,6 +56,14 @@ typedef long long intmax_t;
# include <iterator>
#endif
#if defined(_MSC_VER) && _MSC_VER <= 1500
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
typedef __int64 intmax_t;
#else
#include <stdint.h>
#endif
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
# ifdef FMT_EXPORT
# define FMT_API __declspec(dllexport)