From e3fabe9a44c4b6fc03bcd8a7214db53dc51fc40c Mon Sep 17 00:00:00 2001 From: Jason King Date: Fri, 8 Sep 2017 01:46:06 +0000 Subject: [PATCH] Add long long 64-bit check --- configure.ac | 1 + json_object.c | 4 ++++ 2 files changed, 5 insertions(+) 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 */ -- 2.39.5