signal: OS X port of sigaddset etc. + extern inline
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 19 Sep 2013 20:24:03 +0000 (13:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 19 Sep 2013 21:33:07 +0000 (14:33 -0700)
* lib/signal.in.h (sigaddset, sigdelset, sigemptyset, sigfillset)
(sigismember): #undef on problematic Apple platforms.
* doc/posix-functions/sigaddset.texi:
* doc/posix-functions/sigdelset.texi:
* doc/posix-functions/sigemptyset.texi:
* doc/posix-functions/sigfillset.texi:
* doc/posix-functions/sigismember.texi:
Document this portability problem.

ChangeLog
doc/posix-functions/sigaddset.texi
doc/posix-functions/sigdelset.texi
doc/posix-functions/sigemptyset.texi
doc/posix-functions/sigfillset.texi
doc/posix-functions/sigismember.texi
lib/signal.in.h

index d3491e35db9bc1e6b68d915ec47e0106d3777074..26ddec97d0ea24e28b60af3227d69c718263b902 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2013-09-19  Paul Eggert  <eggert@cs.ucla.edu>
 
+       signal: OS X port of sigaddset etc. + extern inline
+       * lib/signal.in.h (sigaddset, sigdelset, sigemptyset, sigfillset)
+       (sigismember): #undef on problematic Apple platforms.
+       * doc/posix-functions/sigaddset.texi:
+       * doc/posix-functions/sigdelset.texi:
+       * doc/posix-functions/sigemptyset.texi:
+       * doc/posix-functions/sigfillset.texi:
+       * doc/posix-functions/sigismember.texi:
+       Document this portability problem.
+
        extern-inline: do not always suppress extern inline on OS X
        * m4/extern-inline.m4 (gl_EXTERN_INLINE): Suppress the use of
        extern inline on Apple only if the particular compile-time
index 5b1a7aa9af21a1f45163f187738f7182df961192..8333af07253d1b9d239ce070574771035fbe4480 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 mingw, MSVC 9.
+@item
+This function cannot be called from plain inline or extern inline functions
+on some platforms:
+OS X 10.8.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index b6938a5f8d2b7d7038082507736b6e10f152571c..a17a81313e82bd3eb5d0aef9eeb2fd722a69b44c 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 mingw, MSVC 9.
+@item
+This function cannot be called from plain inline or extern inline functions
+on some platforms:
+OS X 10.8.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 17a2d8ebe5f8aa9bb5cb50a03e82902841bc6563..7b4f2f35704e76b6404c535850e1d6acac6975d7 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 mingw, MSVC 9.
+@item
+This function cannot be called from plain inline or extern inline functions
+on some platforms:
+OS X 10.8.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index e1fa6b8c64a2ca93cd48376187d1784c90ea2ff5..9c20f12b138ab257208b8d6b607fa6c5104d2675 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 mingw, MSVC 9.
+@item
+This function cannot be called from plain inline or extern inline functions
+on some platforms:
+OS X 10.8.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 2f995fcca1f872c9d3dbde22ac13c38d6b53f382..4226dad4dff2abcce4a229a657a89df0513cb114 100644 (file)
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
 @item
 This function is missing on some platforms:
 mingw, MSVC 9.
+@item
+This function cannot be called from plain inline or extern inline functions
+on some platforms:
+OS X 10.8.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 54849504d7731401040c804ec265bcc196b7c3b4..a531487e355f42db44af7d062d0564b9a09ff265 100644 (file)
@@ -195,6 +195,20 @@ typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
 
 # endif
 
+/* When also using extern inline, suppress the use of static inline in
+   standard headers of 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 _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
+     && (defined __i386__ || defined __x86_64__))
+# undef sigaddset
+# undef sigdelset
+# undef sigemptyset
+# undef sigfillset
+# undef sigismember
+#endif
+
 /* Test whether a given signal is contained in a signal set.  */
 # if @HAVE_POSIX_SIGNALBLOCKING@
 /* This function is defined as a macro on Mac OS X.  */