mirror of
https://github.com/json-c/json-c.git
synced 2026-03-20 21:49:07 +08:00
As part of this create a public json_config.h with a custom define to decide whether to include inttypes.h to avoid conflicting with other projects config.h header.
27 lines
497 B
C
27 lines
497 B
C
|
|
#ifndef _json_inttypes_h_
|
|
#define _json_inttypes_h_
|
|
|
|
#include "json_config.h"
|
|
|
|
#if defined(_MSC_VER) && _MSC_VER < 1600
|
|
|
|
/* Anything less than Visual Studio C++ 10 is missing stdint.h and inttypes.h */
|
|
typedef __int32 int32_t;
|
|
#define INT32_MIN ((int32_t)_I32_MIN)
|
|
#define INT32_MAX ((int32_t)_I32_MAX)
|
|
typedef __int64 int64_t;
|
|
#define PRId64 "I64d"
|
|
#define SCNd64 "I64d"
|
|
|
|
#else
|
|
|
|
#ifdef JSON_C_HAVE_INTTYPES_H
|
|
#include <inttypes.h>
|
|
#endif
|
|
/* inttypes.h includes stdint.h */
|
|
|
|
#endif
|
|
|
|
#endif
|