Michael Clark | c4dceae | 2010-10-06 16:39:20 +0000 | [diff] [blame] | 1 | |
| 2 | #ifndef _json_inttypes_h_ |
| 3 | #define _json_inttypes_h_ |
| 4 | |
Eric Haszlakiewicz | b21b137 | 2012-02-15 20:44:54 -0600 | [diff] [blame^] | 5 | #include "json_config.h" |
| 6 | |
Michael Clark | c4dceae | 2010-10-06 16:39:20 +0000 | [diff] [blame] | 7 | #if defined(_MSC_VER) && _MSC_VER < 1600 |
| 8 | |
| 9 | /* Anything less than Visual Studio C++ 10 is missing stdint.h and inttypes.h */ |
John Arbash Meinel | 6a231e4 | 2012-02-01 09:27:49 +0100 | [diff] [blame] | 10 | typedef __int32 int32_t; |
| 11 | #define INT32_MIN ((int32_t)_I32_MIN) |
| 12 | #define INT32_MAX ((int32_t)_I32_MAX) |
Michael Clark | c4dceae | 2010-10-06 16:39:20 +0000 | [diff] [blame] | 13 | typedef __int64 int64_t; |
| 14 | #define PRId64 "I64d" |
| 15 | #define SCNd64 "I64d" |
| 16 | |
| 17 | #else |
| 18 | |
Eric Haszlakiewicz | b21b137 | 2012-02-15 20:44:54 -0600 | [diff] [blame^] | 19 | #ifdef JSON_C_HAVE_INTTYPES_H |
Michael Clark | c4dceae | 2010-10-06 16:39:20 +0000 | [diff] [blame] | 20 | #include <inttypes.h> |
| 21 | #endif |
| 22 | /* inttypes.h includes stdint.h */ |
| 23 | |
| 24 | #endif |
| 25 | |
| 26 | #endif |