diff --git a/CHANGELOG.md b/CHANGELOG.md index d8d08de9..434ef5c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ HEAD * Made `JsonDocument`'s destructor protected (issue #1480) * Added missing calls to `client.stop()` in `JsonHttpClient.ino` (issue #1485) +* Fixed error `expected ')' before 'char'` when `isdigit()` is a macro (issue #1487) v6.17.2 (2020-11-14) ------- diff --git a/extras/tests/Misc/conflicts.cpp b/extras/tests/Misc/conflicts.cpp index 5c79faf1..e809fe8a 100644 --- a/extras/tests/Misc/conflicts.cpp +++ b/extras/tests/Misc/conflicts.cpp @@ -39,6 +39,15 @@ #define _max() #define _min() +// Realtek Ameba +#define isdigit(c) (((c) >= '0') && ((c) <= '9')) +#define isprint(c) +#define isxdigit(c) +#define isspace(c) +#define isupper(c) +#define islower(c) +#define isalpha(c) + // issue #839 #define BLOCKSIZE #define CAPACITY diff --git a/src/ArduinoJson/Polyfills/ctype.hpp b/src/ArduinoJson/Polyfills/ctype.hpp index bb3bc8b7..fd3683d6 100644 --- a/src/ArduinoJson/Polyfills/ctype.hpp +++ b/src/ArduinoJson/Polyfills/ctype.hpp @@ -8,9 +8,11 @@ namespace ARDUINOJSON_NAMESPACE { +#ifndef isdigit inline bool isdigit(char c) { return '0' <= c && c <= '9'; } +#endif inline bool issign(char c) { return '-' == c || c == '+';