From d4f819f1f0d7d9691670011cbf87ee514189c60c Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Fri, 18 Oct 2019 22:10:35 +0200 Subject: [PATCH] Added detection of Atmel AVR8/GNU C Compiler (fixes #1112) --- CHANGELOG.md | 1 + src/ArduinoJson/Configuration.hpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de905099..cb58722a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ HEAD * Added conversion from `JsonArray` and `JsonObject` to `bool`, to be consistent with `JsonVariant` * Fixed `deserializeJson()` when input contains duplicate keys (issue #1095) * Improved `deserializeMsgPack()` speed by reading several bytes at once +* Added detection of Atmel AVR8/GNU C Compiler (issue #1112) v6.12.0 (2019-09-05) ------- diff --git a/src/ArduinoJson/Configuration.hpp b/src/ArduinoJson/Configuration.hpp index 1c49ac35..ecaf6816 100644 --- a/src/ArduinoJson/Configuration.hpp +++ b/src/ArduinoJson/Configuration.hpp @@ -20,8 +20,11 @@ // Small or big machine? #ifndef ARDUINOJSON_EMBEDDED_MODE -#if defined(ARDUINO) || defined(__IAR_SYSTEMS_ICC__) || defined(__XC) || \ - defined(__ARMCC_VERSION) +#if defined(ARDUINO) /* Arduino*/ \ + || defined(__IAR_SYSTEMS_ICC__) /* IAR Embedded Workbench */ \ + || defined(__XC) /* MPLAB XC compiler */ \ + || defined(__ARMCC_VERSION) /* Keil ARM Compiler */ \ + || defined(__AVR) /* Atmel AVR8/GNU C Compiler */ #define ARDUINOJSON_EMBEDDED_MODE 1 #else #define ARDUINOJSON_EMBEDDED_MODE 0