From: Bruno Haible Date: Sat, 18 May 2019 15:25:10 +0000 (+0200) Subject: libasprintf: Avoid compilation error on mingw with -D__USE_MINGW_ANSI_STDIO=1. X-Git-Tag: v0.20.2~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=018d2df672e1b8712691514c6105410a14914d4a;p=thirdparty%2Fgettext.git libasprintf: Avoid compilation error on mingw with -D__USE_MINGW_ANSI_STDIO=1. * gettext-runtime/libasprintf/lib-asprintf.c (asprintf, vasprintf): Don't define on mingw when __USE_MINGW_ANSI_STDIO is non-zero. --- diff --git a/gettext-runtime/libasprintf/lib-asprintf.c b/gettext-runtime/libasprintf/lib-asprintf.c index 54649659b..c2fe4ed16 100644 --- a/gettext-runtime/libasprintf/lib-asprintf.c +++ b/gettext-runtime/libasprintf/lib-asprintf.c @@ -1,5 +1,5 @@ /* Library functions for class autosprintf. - Copyright (C) 2002-2003, 2006, 2018 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2006, 2018-2019 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify @@ -40,10 +40,13 @@ #include "asprintf.c" /* Define the same functions also without the 'libasprintf_' prefix, - for binary backward-compatibility. */ + for binary backward-compatibility. + But don't redefine functions already defined by mingw. */ +#if !(defined __MINGW32__ && __USE_MINGW_ANSI_STDIO) #undef asprintf #undef vasprintf #include "vasprintf.c" #include "asprintf.c" +#endif #endif