bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf.o HP-NonStop


From: Bruno Haible
Subject: Re: printf.o HP-NonStop
Date: Sun, 26 Dec 2010 03:45:57 +0100
User-agent: KMail/1.9.9

Bruno Haible wrote:
> Joachim Schmitz wrote:
> > gllig/printf.o is not, but does not contain rpl_printf:
> > $ nm -Pe gllib/printf.o
> > 00000000 E __stdio_fp
> > 00000000 F printf
> > 00000000 E rpl_vfprintf
> 
> gllib/printf.o should define rpl_printf, not printf.

I'm also observing this error on Solaris with cc and CC:

CC -O      -o test-fcntl-h-c++ test-fcntl-h-c++.o ../gllib/libgnu.a  -lrt 
-lsocket 
Undefined                       first referenced
 symbol                             in file
rpl_printf                          test-fcntl-h-c++.o
ld: fatal: Symbol referencing errors. No output written to test-fcntl-h-c++
*** Error code 1

This fixes it:


2010-12-25  Bruno Haible  <address@hidden>

        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 <address@hidden>.

--- lib/stdio.in.h.orig Sun Dec 26 03:42:35 2010
+++ lib/stdio.in.h      Sun Dec 26 03:42:21 2010
@@ -676,6 +676,9 @@
                     _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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]