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 | |
Eric Haszlakiewicz | c629656 | 2013-06-23 19:12:14 -0500 | [diff] [blame] | 7 | #if defined(_MSC_VER) && _MSC_VER <= 1700 |
Michael Clark | c4dceae | 2010-10-06 16:39:20 +0000 | [diff] [blame] | 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; |
Mateusz Loskot | 8409dc0 | 2012-04-23 13:11:11 +0100 | [diff] [blame] | 14 | #define INT64_MIN ((int64_t)_I64_MIN) |
| 15 | #define INT64_MAX ((int64_t)_I64_MAX) |
Michael Clark | c4dceae | 2010-10-06 16:39:20 +0000 | [diff] [blame] | 16 | #define PRId64 "I64d" |
| 17 | #define SCNd64 "I64d" |
| 18 | |
| 19 | #else |
| 20 | |
Eric Haszlakiewicz | b21b137 | 2012-02-15 20:44:54 -0600 | [diff] [blame] | 21 | #ifdef JSON_C_HAVE_INTTYPES_H |
Michael Clark | c4dceae | 2010-10-06 16:39:20 +0000 | [diff] [blame] | 22 | #include <inttypes.h> |
| 23 | #endif |
| 24 | /* inttypes.h includes stdint.h */ |
| 25 | |
| 26 | #endif |
| 27 | |
| 28 | #endif |