Skip to content

Commit a304464

Browse files
authored
Merge pull request json-c#872 from GitMensch/patch-2
fix linkhash breaking -std=c89
2 parents 7b73916 + 6aab3da commit a304464

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

linkhash.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ int lh_table_resize(struct lh_table *t, int new_size);
334334
/**
335335
* @deprecated Don't use this outside of linkhash.h:
336336
*/
337-
#if (defined(AIX_CC) || (defined(_MSC_VER) && (_MSC_VER <= 1800)) )
338-
/* VS2010 can't handle inline funcs, so skip it there */
337+
#if !defined (__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
338+
/* C89 compilers like VS2010 can't handle inline funcs, so skip it there,
339+
note: this also applies to -std=c89 in GCC! */
339340
#define _LH_INLINE
340341
#else
341342
#define _LH_INLINE inline

0 commit comments

Comments
 (0)