mirror of
https://github.com/json-c/json-c.git
synced 2026-04-01 11:29:07 +08:00
Include json_inttypes.h in json_object.h since we use types like int32_t in the API and some systems need that header to compile.
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.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#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 */
|
||||
@@ -14,7 +16,7 @@ typedef __int64 int64_t;
|
||||
|
||||
#else
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#ifdef JSON_C_HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
/* inttypes.h includes stdint.h */
|
||||
|
||||
Reference in New Issue
Block a user