Parcourir la source

cJSON_Utils: Guard gcc pragmas with a check for __GCC__

Max Bruckner il y a 8 ans
Parent
commit
217ab02612
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      cJSON_Utils.c

+ 5 - 0
cJSON_Utils.c

@@ -24,13 +24,18 @@
 #if !defined(_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
 #define _CRT_SECURE_NO_DEPRECATE
 #endif
+
+#ifdef __GNUCC__
 #pragma GCC visibility push(default)
+#endif
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <limits.h>
+#ifdef __GNUCC__
 #pragma GCC visibility pop
+#endif
 
 #include "cJSON_Utils.h"