From: Pavel Hrdina Date: Wed, 9 Jul 2014 11:13:07 +0000 (+0200) Subject: nl_langinfo: fix build under mingw X-Git-Tag: v1.0~7341 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2d280742a9e30088aa169f53353765d5daafe4c0;p=gnulib.git nl_langinfo: fix build under mingw The commit fcfce839 improved localization of names for week days and months, but the author forget to include windows.h in order to use 'GetACP ()'. Without this header file build using mingw fails with this error message: ../../../gnulib/lib/nl_langinfo.c: In function 'ctype_codeset': ../../../gnulib/lib/nl_langinfo.c:76:5: warning: implicit declaration of function 'GetACP' [-Wimplicit-function-declaration] sprintf (buf + 2, "%u", GetACP ()); ^ In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:73:0, from ../../../gnulib/lib/nl_langinfo.c:149: /usr/i686-w64-mingw32/sys-root/mingw/include/winnls.h: At top level: /usr/i686-w64-mingw32/sys-root/mingw/include/winnls.h:653:64: error: conflicting types for 'GetACP' WINBASEAPI UINT WINAPI GetACP(void); ^ ../../../gnulib/lib/nl_langinfo.c:76:29: note: previous implicit declaration of 'GetACP' was here sprintf (buf + 2, "%u", GetACP ()); ^ Signed-off-by: Pavel Hrdina Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index a70340a59c..66fd9c8348 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-07-09 Pavel Hrdina (tiny change) + + nl_langinfo: fix build under mingw + * lib/nl_langinfo.c (includes): Pick up for GetACP(). + 2014-07-09 Andrew D Warshall mountlist: do not classify a bind-mounted dir entry as "dummy" diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c index b0be821676..b5f2000d2d 100644 --- a/lib/nl_langinfo.c +++ b/lib/nl_langinfo.c @@ -23,6 +23,7 @@ #include #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include # include #endif