Make macro json_object_object_foreach multiple-use safe
[platform/upstream/json-c.git] / json_inttypes.h
1
2 #ifndef _json_inttypes_h_
3 #define _json_inttypes_h_
4
5 #include "json_config.h"
6
7 #if defined(_MSC_VER) && _MSC_VER < 1700
8
9 /* Anything less than Visual Studio C++ 10 is missing stdint.h and inttypes.h */
10 typedef __int32 int32_t;
11 #define INT32_MIN    ((int32_t)_I32_MIN)
12 #define INT32_MAX    ((int32_t)_I32_MAX)
13 typedef __int64 int64_t;
14 #define INT64_MIN    ((int64_t)_I64_MIN)
15 #define INT64_MAX    ((int64_t)_I64_MAX)
16 #define PRId64 "I64d"
17 #define SCNd64 "I64d"
18
19 #else
20
21 #ifdef JSON_C_HAVE_INTTYPES_H
22 #include <inttypes.h>
23 #endif
24 /* inttypes.h includes stdint.h */
25
26 #endif
27
28 #endif