[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
extern-inline: be -Wundef safe in config.h
From: |
Akim Demaille |
Subject: |
extern-inline: be -Wundef safe in config.h |
Date: |
Tue, 25 Sep 2012 14:27:31 +0200 |
Recent changes introduce -Wundef warnings in config.h. The
appended proposal eliminates them.
From c25db77aa193431c0669df846153a9e67db585d0 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Tue, 25 Sep 2012 13:58:12 +0200
Subject: [PATCH] extern-inline: provide a -Wundef safe config.h
* m4/extern-inline.m4 (gl_EXTERN_INLINE): Protect
"#if __GNUC_STDC_INLINE__" with "defined __GNUC_STDC_INLINE__"
to produce a -Wundef warning free config.h.
---
m4/extern-inline.m4 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 12f24fa..600c8d3 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -18,7 +18,9 @@ AC_DEFUN([gl_EXTERN_INLINE],
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
_GL_INLINE_HEADER_END contains useful stuff to put
in the same include file, after uses of _GL_INLINE. */
-#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__
+#if (__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : 199901L <= __STDC_VERSION__)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
@@ -35,7 +37,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
#endif
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
-# if __GNUC_STDC_INLINE__
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
# else
# define _GL_INLINE_HEADER_CONST_PRAGMA \
--
1.7.12.1
- extern-inline: be -Wundef safe in config.h,
Akim Demaille <=