]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
fix linkhash breaking -std=c89 872/head
authorSimon Sobisch <simonsobisch@web.de>
Mon, 7 Oct 2024 08:16:42 +0000 (08:16 +0000)
committerSimon Sobisch <simonsobisch@web.de>
Mon, 7 Oct 2024 08:16:42 +0000 (08:16 +0000)
making the definition of _LH_INLINE depending on __STDC_VERSION__, not on a specific compiler

linkhash.h

index 5e5e240822a1f8312072452243a5926cadbd5c4d..65c4909683856c53f93479a71fcf5ef7f6771d30 100644 (file)
@@ -334,8 +334,9 @@ int lh_table_resize(struct lh_table *t, int new_size);
 /**
  * @deprecated Don't use this outside of linkhash.h:
  */
-#if (defined(AIX_CC) || (defined(_MSC_VER) && (_MSC_VER <= 1800)) )
-/* VS2010 can't handle inline funcs, so skip it there */
+#if !defined (__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
+/* C89 compilers like VS2010 can't handle inline funcs, so skip it there,
+   note: this also applies to -std=c89 in GCC! */
 #define _LH_INLINE
 #else
 #define _LH_INLINE inline