diff options
author | Eric Hawicz <erh+git@nimenees.com> | 2021-05-15 08:41:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 08:41:24 -0400 |
commit | 0b7e78c309bd2c0cecb598a782c72b23dc654d60 (patch) | |
tree | f26ead399be5306a7a19c7ca39e02e6ecaf06ce8 | |
parent | cd7109f767a6d9f20caa9d10fbf4eab9c5262e7a (diff) | |
parent | 00098efc966ee4551255ab5841d83e2e5345a3ad (diff) | |
download | json-c-0b7e78c309bd2c0cecb598a782c72b23dc654d60.tar.gz |
Merge pull request #706 from davidjmccann/master
Check __STDC_VERSION__ is defined before checking its value
-rw-r--r-- | json_object.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/json_object.h b/json_object.h index 036be64..d67f384 100644 --- a/json_object.h +++ b/json_object.h @@ -470,7 +470,7 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key * @param val the local name for the json_object* object variable defined in * the body */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) #define json_object_object_foreach(obj, key, val) \ char *key = NULL; \ @@ -502,7 +502,7 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key : 0); \ entry##key = entry_next##key) -#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L */ +#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) */ /** Iterate through all keys and values of an object (ANSI C Safe) * @param obj the json_object instance |