From 018d2df672e1b8712691514c6105410a14914d4a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 18 May 2019 17:25:10 +0200 Subject: [PATCH] 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. --- gettext-runtime/libasprintf/lib-asprintf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.47.2