bug-gnulib
[Top][All Lists]
Advanced

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

Re: multiple definitions of __printf__


From: Bruno Haible
Subject: Re: multiple definitions of __printf__
Date: Thu, 25 Mar 2010 08:06:32 +0100
User-agent: KMail/1.9.9

Hello,

Michel Boaventura wrote:
> I'm trying to compile a project which uses both gettext and gnulib. I'm
> using mingw, and getting the above error:
> 
> /home/michel/prof/pspp/sources/mingw/usr/i686-pc-mingw32/lib/libintl.a(printf.o):
>  In function `__printf__':
> /home/arquivos/prof/pspp/sources/mingw/tmp-gettext/gettext-0.17/gettext-runtime/intl/./printf.c:143:
>  multiple definition of `___printf__'
> src/.libs/libpspp.a(printf.o):printf.c:(.text+0x0): first defined here

This should fix it:


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

        Avoid collision between gnulib wrapper and libintl wrapper.
        * lib/printf.c (printf): Don't define if a printf wrapper is already
        defined in intl/printf.c.
        Reported by Michel Boaventura <address@hidden>.

--- lib/printf.c.orig   Thu Mar 25 08:05:19 2010
+++ lib/printf.c        Thu Mar 25 08:03:48 2010
@@ -1,5 +1,5 @@
 /* Formatted output to a stream.
-   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,8 @@
 
 #include <stdarg.h>
 
+#if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */
+
 /* Print formatted output to standard output.
    Return string length of formatted string.  On error, return a negative
    value.  */
@@ -38,3 +40,5 @@
 
   return retval;
 }
+
+#endif




reply via email to

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