[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/5] stdio: OS X port of putc_unlocked + extern inline
From: |
Paul Eggert |
Subject: |
[PATCH 4/5] stdio: OS X port of putc_unlocked + extern inline |
Date: |
Thu, 19 Sep 2013 14:29:27 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
* lib/stdio.in.h (putc_unlocked): #undef on problematic Apple platforms.
* doc/posix-functions/putc_unlocked.texi:
* doc/posix-functions/putchar_unlocked.texi:
Document this portability problem.
---
ChangeLog | 6 ++++++
doc/posix-functions/putc_unlocked.texi | 4 ++++
doc/posix-functions/putchar_unlocked.texi | 4 ++++
lib/stdio.in.h | 9 +++++++++
4 files changed, 23 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 4048dfb..9eb2c2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2013-09-19 Paul Eggert <address@hidden>
+ stdio: OS X port of putc_unlocked + extern inline
+ * lib/stdio.in.h (putc_unlocked): #undef on problematic Apple platforms.
+ * doc/posix-functions/putc_unlocked.texi:
+ * doc/posix-functions/putchar_unlocked.texi:
+ Document this portability problem.
+
signal: OS X port of sigaddset etc. + extern inline
* lib/signal.in.h (sigaddset, sigdelset, sigemptyset, sigfillset)
(sigismember): #undef on problematic Apple platforms.
diff --git a/doc/posix-functions/putc_unlocked.texi
b/doc/posix-functions/putc_unlocked.texi
index 663bfdf..68f9d2c 100644
--- a/doc/posix-functions/putc_unlocked.texi
+++ b/doc/posix-functions/putc_unlocked.texi
@@ -8,6 +8,10 @@ Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
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/putchar_unlocked.texi
b/doc/posix-functions/putchar_unlocked.texi
index f0fe807..d307fe5 100644
--- a/doc/posix-functions/putchar_unlocked.texi
+++ b/doc/posix-functions/putchar_unlocked.texi
@@ -8,6 +8,10 @@ Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
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/stdio.in.h b/lib/stdio.in.h
index d945d5c..232fd98 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -124,6 +124,15 @@
#define _GL_STDIO_STRINGIZE(token) #token
#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
+/* 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 __GNUC__ && defined __STDC__)
+# undef putc_unlocked
+#endif
#if @GNULIB_DPRINTF@
# if @REPLACE_DPRINTF@
--
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, 2013/09/19
- [PATCH 4/5] stdio: OS X port of putc_unlocked + extern inline,
Paul Eggert <=
- [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