bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: problem with "#define printf libintl_printf" in "libintl.h"


From: Bruno Haible
Subject: Re: problem with "#define printf libintl_printf" in "libintl.h"
Date: Tue, 20 Jun 2006 14:02:27 +0200
User-agent: KMail/1.9.1

Henry Nelson wrote:
> > > /usr/local/include/slang.h:899: warning: `libintl_printf' is an 
> > > unrecognized 
> > > format function type
> uname -sr => NetBSD 3.0.0_STABLE
> gcc --version => gcc (GCC) 3.3.3 (NetBSD nb3 20040520)

Find attached a workaround. Thanks for the report.

Bruno


2006-06-19  Bruno Haible  <address@hidden>

        * libgnuintl.h.in (libintl_printf): Define to __printf__ on NetBSD.
        Reported by Henry Nelson <address@hidden>.

diff -r -c3 --exclude='*.po*' --exclude='*.info*' --exclude='*_*.html' 
--exclude='*.*.html' --exclude='*.[13]' --exclude='*.1.in' 
--exclude=Makefile.in --exclude=aclocal.m4 --exclude=configure 
--exclude=version.texi --exclude=stamp-vti --exclude='po-*-gen*.[ch]' 
--exclude='*.o' --exclude='*.lo' --exclude='*.gmo' --exclude=ABOUT-NLS 
--exclude='javadoc[12]' --exclude=CVS 
gettext-cvs/gettext-runtime/intl/libgnuintl.h.in 
gettext-6/gettext-runtime/intl/libgnuintl.h.in
*** gettext-cvs/gettext-runtime/intl/libgnuintl.h.in    Wed May 17 00:38:10 2006
--- gettext-6/gettext-runtime/intl/libgnuintl.h.in      Tue Jun 20 02:11:11 2006
***************
*** 330,335 ****
--- 330,340 ----
  extern int vfprintf (FILE *, const char *, va_list);
  
  #undef printf
+ #ifdef __NetBSD__
+ /* Don't break __attribute__((format(printf,M,N))).  This redefinition is only
+    possible because NetBSD's libc does not have a function __printf__.  */
+ # define libintl_printf __printf__
+ #endif
  #define printf libintl_printf
  extern int printf (const char *, ...);
  #undef vprintf




reply via email to

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