[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] signal: OS X port of sigaddset etc. + extern inline
From: |
Paul Eggert |
Subject: |
[PATCH 3/5] signal: OS X port of sigaddset etc. + extern inline |
Date: |
Thu, 19 Sep 2013 14:28:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
* 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 | 10 ++++++++++
doc/posix-functions/sigaddset.texi | 4 ++++
doc/posix-functions/sigdelset.texi | 4 ++++
doc/posix-functions/sigemptyset.texi | 4 ++++
doc/posix-functions/sigfillset.texi | 4 ++++
doc/posix-functions/sigismember.texi | 4 ++++
lib/signal.in.h | 14 ++++++++++++++
7 files changed, 44 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 39c2e12..4048dfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2013-09-19 Paul Eggert <address@hidden>
+ 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
diff --git a/doc/posix-functions/sigaddset.texi
b/doc/posix-functions/sigaddset.texi
index 5b1a7aa..8333af0 100644
--- a/doc/posix-functions/sigaddset.texi
+++ b/doc/posix-functions/sigaddset.texi
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
@item
This function is missing on some platforms:
mingw, MSVC 9.
address@hidden
+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:
diff --git a/doc/posix-functions/sigdelset.texi
b/doc/posix-functions/sigdelset.texi
index b6938a5..a17a813 100644
--- a/doc/posix-functions/sigdelset.texi
+++ b/doc/posix-functions/sigdelset.texi
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
@item
This function is missing on some platforms:
mingw, MSVC 9.
address@hidden
+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:
diff --git a/doc/posix-functions/sigemptyset.texi
b/doc/posix-functions/sigemptyset.texi
index 17a2d8e..7b4f2f3 100644
--- a/doc/posix-functions/sigemptyset.texi
+++ b/doc/posix-functions/sigemptyset.texi
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
@item
This function is missing on some platforms:
mingw, MSVC 9.
address@hidden
+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:
diff --git a/doc/posix-functions/sigfillset.texi
b/doc/posix-functions/sigfillset.texi
index e1fa6b8..9c20f12 100644
--- a/doc/posix-functions/sigfillset.texi
+++ b/doc/posix-functions/sigfillset.texi
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
@item
This function is missing on some platforms:
mingw, MSVC 9.
address@hidden
+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:
diff --git a/doc/posix-functions/sigismember.texi
b/doc/posix-functions/sigismember.texi
index 2f995fc..4226dad 100644
--- a/doc/posix-functions/sigismember.texi
+++ b/doc/posix-functions/sigismember.texi
@@ -11,6 +11,10 @@ Portability problems fixed by Gnulib:
@item
This function is missing on some platforms:
mingw, MSVC 9.
address@hidden
+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:
diff --git a/lib/signal.in.h b/lib/signal.in.h
index 5484950..a531487 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -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. */
--
1.8.3.1
- [PATCH 1/5] extern-inline: document fixes for ctype and wctype macros, Paul Eggert, 2013/09/19
- [PATCH 2/5] extern-inline: do not always suppress extern inline on OS X, Paul Eggert, 2013/09/19
- [PATCH 3/5] signal: OS X port of sigaddset etc. + extern inline,
Paul Eggert <=
- [PATCH 4/5] stdio: OS X port of putc_unlocked + extern inline, Paul Eggert, 2013/09/19
- [PATCH 5/5] timespec: new function make_timespec, and new constants, Paul Eggert, 2013/09/19
- Re: [PATCH 1/5] extern-inline: document fixes for ctype and wctype macros, Eric Blake, 2013/09/19