| @@ -1,3 +1,5 @@ | |||||
| /* Define to 1 if you have the <stdbool.h> header file. */ | |||||
| #undef JSON_C_HAVE_STDBOOL_H | |||||
| /* Define to 1 if you have the <inttypes.h> header file. */ | /* Define to 1 if you have the <inttypes.h> header file. */ | ||||
| #undef JSON_C_HAVE_INTTYPES_H | #undef JSON_C_HAVE_INTTYPES_H | ||||
| @@ -16,13 +16,11 @@ | |||||
| */ | */ | ||||
| #include <stddef.h> | #include <stddef.h> | ||||
| #include <stdbool.h> | |||||
| #include "json.h" | #include "json.h" | ||||
| #include "json_object_private.h" | #include "json_object_private.h" | ||||
| #include "json_object_iterator.h" | #include "json_object_iterator.h" | ||||
| #include "json_stdbool.h" | |||||
| /** | /** | ||||
| * How It Works | * How It Works | ||||
| * | * | ||||
| @@ -29,7 +29,8 @@ | |||||
| #define JSON_OBJECT_ITERATOR_H | #define JSON_OBJECT_ITERATOR_H | ||||
| #include <stddef.h> | #include <stddef.h> | ||||
| #include <stdbool.h> | |||||
| #include "json_stdbool.h" | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| @@ -0,0 +1,33 @@ | |||||
| #ifndef _json_stdbool_h_ | |||||
| #define _json_stdbool_h_ | |||||
| #include "json_config.h" | |||||
| #ifndef __cplusplus | |||||
| #if defined(_MSC_VER) | |||||
| /* The C language implementation does not provide the standard header | |||||
| * file "stdbool.h" as required by ISO/IEC 9899:1999. | |||||
| */ | |||||
| #if !defined(bool) | |||||
| #define bool int | |||||
| #endif | |||||
| #if !defined(true) | |||||
| #define true 1 | |||||
| #endif | |||||
| #if !defined(false) | |||||
| #define false 0 | |||||
| #endif | |||||
| #else /* ndef _MSC_VER */ | |||||
| #ifdef JSON_C_HAVE_STDBOOL_H | |||||
| #include <stdbool.h> | |||||
| #endif | |||||
| #endif /* _MSC_VER */ | |||||
| #endif /* __cplusplus */ | |||||
| #endif /* _json_stdbool_h_ */ | |||||