diff --git a/CHANGELOG.md b/CHANGELOG.md index 989fd9a6..0f2ec63e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ HEAD * Remove `ARDUINOJSON_EMBEDDED_MODE` and assume we run on an embedded platform. Dependent settings (like `ARDUINOJSON_DEFAULT_NESTING_LIMIT`) must be set individually. * Change the default of `ARDUINOJSON_USE_DOUBLE` to `1` +* Change the default of `ARDUINOJSON_USE_LONG_LONG` to `1` on 32-bit platforms v6.18.5 (2021-09-28) ------- diff --git a/extras/conf_test/esp8266.cpp b/extras/conf_test/esp8266.cpp index 8f45d6fa..bb9988bd 100644 --- a/extras/conf_test/esp8266.cpp +++ b/extras/conf_test/esp8266.cpp @@ -1,6 +1,6 @@ #include -static_assert(ARDUINOJSON_USE_LONG_LONG == 0, "ARDUINOJSON_USE_LONG_LONG"); +static_assert(ARDUINOJSON_USE_LONG_LONG == 1, "ARDUINOJSON_USE_LONG_LONG"); static_assert(ARDUINOJSON_SLOT_OFFSET_SIZE == 2, "ARDUINOJSON_SLOT_OFFSET_SIZE"); diff --git a/src/ArduinoJson/Configuration.hpp b/src/ArduinoJson/Configuration.hpp index fd320d24..e9612f66 100644 --- a/src/ArduinoJson/Configuration.hpp +++ b/src/ArduinoJson/Configuration.hpp @@ -83,6 +83,13 @@ // Store integral values with long (0) or long long (1) #ifndef ARDUINOJSON_USE_LONG_LONG +# if ARDUINOJSON_HAS_LONG_LONG && defined(__SIZEOF_POINTER__) && \ + __SIZEOF_POINTER__ >= 4 || \ + defined(_MSC_VER) +# define ARDUINOJSON_USE_LONG_LONG 1 +# endif +#endif +#ifndef ARDUINOJSON_USE_LONG_LONG # define ARDUINOJSON_USE_LONG_LONG 0 #endif