From: Bruno Haible Date: Fri, 14 Jul 2006 12:13:51 +0000 (+0000) Subject: Avoid a link error on mingw. X-Git-Tag: v0.15~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6997c7c0cde5f9b963d324c9a11e6b68dd0be77b;p=thirdparty%2Fgettext.git Avoid a link error on mingw. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 55a656740..19cd9e047 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,9 @@ +2006-07-13 Bruno Haible + + * printf.c (libintl_printf): Define to __printf__ on NetBSD, Cygwin, + mingw. + Reported by haibin zhang . + 2006-06-22 Ulrich Drepper * dcigettext.c (DCIGETTEXT): If _nl_find_msg returns -1 don't look diff --git a/gettext-runtime/intl/printf.c b/gettext-runtime/intl/printf.c index 5e112b69b..275968b37 100644 --- a/gettext-runtime/intl/printf.c +++ b/gettext-runtime/intl/printf.c @@ -1,5 +1,5 @@ /* Formatted output to strings, using POSIX/XSI format strings with positions. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2006 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it @@ -61,6 +61,14 @@ char *alloca (); #define STATIC static +/* This needs to be consistent with libgnuintl.h.in. */ +#if defined __NetBSD__ || defined __CYGWIN__ || defined __MINGW32__ +/* Don't break __attribute__((format(printf,M,N))). + This redefinition is only possible because the libc in NetBSD, Cygwin, + mingw does not have a function __printf__. */ +# define libintl_printf __printf__ +#endif + /* Define auxiliary functions declared in "printf-args.h". */ #include "printf-args.c"