blob: 9de8d246d9dda0ab82772fc9d97ec1a9b3ad2807 [file] [log] [blame]
Michael Clarkc4dceae2010-10-06 16:39:20 +00001
2#ifndef _json_inttypes_h_
3#define _json_inttypes_h_
4
Eric Haszlakiewiczb21b1372012-02-15 20:44:54 -06005#include "json_config.h"
6
Eric Haszlakiewiczc6296562013-06-23 19:12:14 -05007#if defined(_MSC_VER) && _MSC_VER <= 1700
Michael Clarkc4dceae2010-10-06 16:39:20 +00008
9/* Anything less than Visual Studio C++ 10 is missing stdint.h and inttypes.h */
John Arbash Meinel6a231e42012-02-01 09:27:49 +010010typedef __int32 int32_t;
11#define INT32_MIN ((int32_t)_I32_MIN)
12#define INT32_MAX ((int32_t)_I32_MAX)
Michael Clarkc4dceae2010-10-06 16:39:20 +000013typedef __int64 int64_t;
Mateusz Loskot8409dc02012-04-23 13:11:11 +010014#define INT64_MIN ((int64_t)_I64_MIN)
15#define INT64_MAX ((int64_t)_I64_MAX)
Michael Clarkc4dceae2010-10-06 16:39:20 +000016#define PRId64 "I64d"
17#define SCNd64 "I64d"
18
19#else
20
Eric Haszlakiewiczb21b1372012-02-15 20:44:54 -060021#ifdef JSON_C_HAVE_INTTYPES_H
Michael Clarkc4dceae2010-10-06 16:39:20 +000022#include <inttypes.h>
23#endif
24/* inttypes.h includes stdint.h */
25
26#endif
27
28#endif