summaryrefslogtreecommitdiff
path: root/lib/stdio.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-09-19 13:25:43 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-09-19 14:33:07 -0700
commit6f3c76e0dc5cb93b7e0d1db77143ad9ef2e773b7 (patch)
tree1bcbe53cb3614932a587e885b5e4055ec36fd45d /lib/stdio.in.h
parent1184458d513a6fe25c609fe642d1ccf8c159ac00 (diff)
downloadgnulib-6f3c76e0dc5cb93b7e0d1db77143ad9ef2e773b7.tar.gz
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.
Diffstat (limited to 'lib/stdio.in.h')
-rw-r--r--lib/stdio.in.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index d945d5cebb..232fd988a9 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@