From: Jason King Date: Fri, 8 Sep 2017 01:46:06 +0000 (+0000) Subject: Add long long 64-bit check X-Git-Tag: json-c-0.13-20171207~47^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F360%2Fhead;p=thirdparty%2Fjson-c.git Add long long 64-bit check --- diff --git a/configure.ac b/configure.ac index 0ebf8232..d29a387d 100644 --- a/configure.ac +++ b/configure.ac @@ -173,6 +173,7 @@ AX_COMPILE_CHECK_SIZEOF(int) AX_COMPILE_CHECK_SIZEOF(long) AX_COMPILE_CHECK_SIZEOF(long long) AX_COMPILE_CHECK_SIZEOF(size_t, [#include ]) +AX_COMPILE_CHECK_SIZEOF(int64_t, [#include ]) AC_CONFIG_FILES([ Makefile diff --git a/json_object.c b/json_object.c index 01ee0a87..9ffb149d 100644 --- a/json_object.c +++ b/json_object.c @@ -33,6 +33,10 @@ #include "strdup_compat.h" #include "snprintf_compat.h" +#if SIZEOF_LONG_LONG != SIZEOF_INT64_T +#error "The long long type isn't 64-bits" +#endif + // Don't define this. It's not thread-safe. /* #define REFCOUNT_DEBUG 1 */