From d9774ea487f683440a001d44a1487bbaefe1d310 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 28 Apr 2013 21:48:30 -0700 Subject: [PATCH] Merge from gnulib. This incorporates: 2013-04-28 extern-inline: work around bug in Sun c99 --- ChangeLog | 5 +++++ m4/extern-inline.m4 | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6dfed3dc56..29433c8f132 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-29 Paul Eggert + + Merge from gnulib, incorporating: + 2013-04-28 extern-inline: work around bug in Sun c99 + 2013-04-27 Paul Eggert Merge from gnulib, incorporating: diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 0152f29326b..94b46dde07d 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -21,13 +21,21 @@ AC_DEFUN([gl_EXTERN_INLINE], Suppress extern inline with HP-UX cc, as it appears to be broken; see . - Suppress the use of extern inline on Apple's platforms, - as Libc-825.25 (2012-09-19) is incompatible with it; see + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress the use of extern inline on Apple's platforms, as Libc at least + through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g., . Perhaps Apple will fix this some day. */ #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : 199901L <= __STDC_VERSION__ && !defined __HP_cc) \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ && !defined __APPLE__) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline -- 2.39.2