From 6aab3da807739b28ea4de23bf56036f9d46b1b57 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Mon, 7 Oct 2024 08:16:42 +0000 Subject: [PATCH] fix linkhash breaking -std=c89 making the definition of _LH_INLINE depending on __STDC_VERSION__, not on a specific compiler --- linkhash.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linkhash.h b/linkhash.h index 5e5e2408..65c49096 100644 --- a/linkhash.h +++ b/linkhash.h @@ -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 -- 2.39.5