mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Long long ints: optional compile choice
This commit is contained in:
2
cJSON.c
2
cJSON.c
@ -70,7 +70,7 @@
|
|||||||
#define false ((cJSON_bool)0)
|
#define false ((cJSON_bool)0)
|
||||||
|
|
||||||
/* define our own int max and min */
|
/* define our own int max and min */
|
||||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
#if defined(CJSON_INT_USE_LONGLONG) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
#define CJSON_INT_MAX LLONG_MAX
|
#define CJSON_INT_MAX LLONG_MAX
|
||||||
#define CJSON_INT_MIN LLONG_MIN
|
#define CJSON_INT_MIN LLONG_MIN
|
||||||
#define strtoint(s) strtoll((const char*)(s), NULL, 0)
|
#define strtoint(s) strtoll((const char*)(s), NULL, 0)
|
||||||
|
4
cJSON.h
4
cJSON.h
@ -99,7 +99,9 @@ then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJ
|
|||||||
#define cJSON_IsReference 256
|
#define cJSON_IsReference 256
|
||||||
#define cJSON_StringIsConst 512
|
#define cJSON_StringIsConst 512
|
||||||
|
|
||||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
#define notCJSON_INT_USE_LONGLONG
|
||||||
|
|
||||||
|
#if defined(CJSON_INT_USE_LONGLONG) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
typedef long long cJSON_int;
|
typedef long long cJSON_int;
|
||||||
#else
|
#else
|
||||||
typedef int cJSON_int;
|
typedef int cJSON_int;
|
||||||
|
Reference in New Issue
Block a user