summaryrefslogtreecommitdiff
path: root/m4/extern-inline.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-09-19 14:40:08 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-09-19 14:40:08 -0700
commit230fe2a5a10f2bc128f354e3fb1b48536b1f143b (patch)
treeb282d5f242b8ada877d188d03d43da78b175d67a /m4/extern-inline.m4
parentc39cc7d149d28060c40bc206eb8a63f7a0636301 (diff)
downloademacs-230fe2a5a10f2bc128f354e3fb1b48536b1f143b.tar.gz
Merge from gnulib.
This incorporates the following changes: 2013-09-19 stdio: OS X port of putc_unlocked + extern inline 2013-09-19 signal: OS X port of sigaddset etc. + extern inline 2013-09-19 extern-inline: do not always suppress extern inline on OS X 2013-09-17 getgroups: statement without effect 2013-08-28 headers: check that _GL_INLINE_HEADER_BEGIN is defined
Diffstat (limited to 'm4/extern-inline.m4')
-rw-r--r--m4/extern-inline.m417
1 files changed, 13 insertions, 4 deletions
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index c4c5e7f221b..4862d60d8e7 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -19,20 +19,28 @@ AC_DEFUN([gl_EXTERN_INLINE],
'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.,
+ Suppress the use of extern inline on problematic Apple configurations, as
+ Libc at least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
Perhaps Apple will fix this some day. */
+#if (defined __APPLE__ \
+ && ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus)))
+# define _GL_EXTERN_INLINE_APPLE_BUG
+#endif
#if ((__GNUC__ \
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
&& !(defined __SUNPRO_C && __STDC__))) \
- && !defined __APPLE__)
+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
- && !defined __APPLE__)
+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
# if __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
@@ -40,6 +48,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_INLINE extern inline
# endif
# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
#else
# define _GL_INLINE static _GL_UNUSED
# define _GL_EXTERN_INLINE static _GL_UNUSED