Skip to content

Commit 0b7e78c

Browse files
authored
Merge pull request json-c#706 from davidjmccann/master
Check __STDC_VERSION__ is defined before checking its value
2 parents cd7109f + 00098ef commit 0b7e78c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

json_object.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key
470470
* @param val the local name for the json_object* object variable defined in
471471
* the body
472472
*/
473-
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L
473+
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
474474

475475
#define json_object_object_foreach(obj, key, val) \
476476
char *key = NULL; \
@@ -502,7 +502,7 @@ JSON_EXPORT void json_object_object_del(struct json_object *obj, const char *key
502502
: 0); \
503503
entry##key = entry_next##key)
504504

505-
#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L */
505+
#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) */
506506

507507
/** Iterate through all keys and values of an object (ANSI C Safe)
508508
* @param obj the json_object instance

0 commit comments

Comments
 (0)