printf-posix: Fix link error when a non-GCC compiler is used.
authorBruno Haible <bruno@clisp.org>
Sun, 26 Dec 2010 02:45:21 +0000 (03:45 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 26 Dec 2010 02:45:21 +0000 (03:45 +0100)
* lib/stdio.in.h (printf): When not using GCC, override printf
correctly.
Reported by Joachim Schmitz <jojo@schmitz-digital.de>.

ChangeLog
lib/stdio.in.h

index 763cd2e..26d64d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-12-25  Bruno Haible  <bruno@clisp.org>
 
+       printf-posix: Fix link error when a non-GCC compiler is used.
+       * lib/stdio.in.h (printf): When not using GCC, override printf
+       correctly.
+       Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
+
+2010-12-25  Bruno Haible  <bruno@clisp.org>
+
        strerror_r-posix: Update doc.
        * doc/posix-functions/strerror_r.texi: Update doc about the return
        value. See <http://sources.redhat.com/bugzilla/show_bug.cgi?id=12204>.
index 2b84cfe..13479b8 100644 (file)
@@ -676,6 +676,9 @@ _GL_FUNCDECL_RPL_1 (__printf__, int,
                     _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
 #  else
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define printf rpl_printf
+#   endif
 _GL_FUNCDECL_RPL (printf, int,
                   (const char *format, ...)
                   __attribute__ ((__format__ (__printf__, 1, 2)))