changeset 9339:06538f749e42

Prefer the ISO C99 inline semantics over the old GNU C inline semantics.
author Bruno Haible <bruno@clisp.org>
date Sat, 13 Oct 2007 15:48:53 +0200
parents ac948d4118d2
children 0a3ccd66183f
files ChangeLog lib/argp-fmtstream.h lib/argp.h
diffstat 3 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-13  Bruno Haible  <bruno@clisp.org>
+
+	* lib/argp-fmtstream.h (ARGP_FS_EI): If __GNUC_STDC_INLINE__ is
+	defined, use the ISO C99 inline semantics.
+	* lib/argp.h (ARGP_EI): Likewise.
+
 2007-10-13  Bruno Haible  <bruno@clisp.org>
 
 	Handle 'inline' change in gcc 4.3.0.
--- a/lib/argp-fmtstream.h
+++ b/lib/argp-fmtstream.h
@@ -211,7 +211,9 @@
         warning: C99 inline functions are not supported; using GNU89
         warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
       It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.  */
-#  if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+#  if defined __GNUC_STDC_INLINE__
+#   define ARGP_FS_EI inline
+#  elif defined __GNUC_GNU_INLINE__
 #   define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__))
 #  else
 #   define ARGP_FS_EI extern inline
--- a/lib/argp.h
+++ b/lib/argp.h
@@ -593,7 +593,9 @@
          warning: C99 inline functions are not supported; using GNU89
          warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
        It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.  */
-#   if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+#   if defined __GNUC_STDC_INLINE__
+#    define ARGP_EI __inline__
+#   elif defined __GNUC_GNU_INLINE__
 #    define ARGP_EI extern __inline__ __attribute__ ((__gnu_inline__))
 #   else
 #    define ARGP_EI extern __inline__