From: Bruno Haible Date: Sat, 13 Oct 2007 13:48:53 +0000 (+0200) Subject: Prefer the ISO C99 inline semantics over the old GNU C inline semantics. X-Git-Tag: v0.0~85 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=0d130620227c50d116f6939be2913ea1fb8435f2;p=gnulib.git Prefer the ISO C99 inline semantics over the old GNU C inline semantics. --- diff --git a/ChangeLog b/ChangeLog index 9449892bd..ec94edaeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-10-13 Bruno Haible + * 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 + Handle 'inline' change in gcc 4.3.0. * lib/argp-fmtstream.h (argp_fmtstream_putc, argp_fmtstream_puts, argp_fmtstream_write, argp_fmtstream_set_lmargin, diff --git a/lib/argp-fmtstream.h b/lib/argp-fmtstream.h index 18033192b..50f1387f4 100644 --- a/lib/argp-fmtstream.h +++ b/lib/argp-fmtstream.h @@ -211,7 +211,9 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); 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 diff --git a/lib/argp.h b/lib/argp.h index c409ec40c..aa76eb4e4 100644 --- a/lib/argp.h +++ b/lib/argp.h @@ -593,7 +593,9 @@ extern void *__argp_input (const struct argp *__restrict __argp, 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__