diff options
author | Sebastian Morr | 2015-06-24 22:33:37 +0200 |
---|---|---|
committer | Sebastian Morr | 2015-06-24 22:33:37 +0200 |
commit | 36e6133998481f57248d1f72f0c779e1990938c1 (patch) | |
tree | 2013269710e8ed39be8e0f79dda5c9b13da98924 /0001-nl_langinfo.mingw32.patch | |
download | aur-36e6133998481f57248d1f72f0c779e1990938c1.tar.gz |
Initial commit
Diffstat (limited to '0001-nl_langinfo.mingw32.patch')
-rw-r--r-- | 0001-nl_langinfo.mingw32.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/0001-nl_langinfo.mingw32.patch b/0001-nl_langinfo.mingw32.patch new file mode 100644 index 000000000000..eaf51547fd16 --- /dev/null +++ b/0001-nl_langinfo.mingw32.patch @@ -0,0 +1,44 @@ +--- popt-1.16/poptint.c.orig 2010-01-19 04:39:10 +0400 ++++ popt-1.16/poptint.c 2012-05-05 22:02:40 +0400 +@@ -86,8 +86,20 @@ + if (istr == NULL) + return NULL; + +-#ifdef HAVE_LANGINFO_H ++#if defined(HAVE_LANGINFO_H) ++# if !defined(WIN32) + codeset = nl_langinfo ((nl_item)CODESET); ++# else ++ { ++ static char __langinfo[251]; ++ unsigned int cp = GetACP(); ++ if (cp) ++ sprintf(__langinfo, "CP%u", cp); ++ else ++ strcpy(__langinfo, "UTF-8"); /* ? */ ++ codeset = __langinfo; ++ } ++# endif + #endif + + if (codeset != NULL && strcmp(codeset, "UTF-8") != 0 +--- popt-1.16/poptint.h.orig 2010-01-19 04:39:10 +0400 ++++ popt-1.16/poptint.h 2012-05-05 22:07:21 +0400 +@@ -172,7 +173,7 @@ + #endif + #endif + +-#ifdef HAVE_LANGINFO_H ++#if defined(HAVE_LANGINFO_H) && !defined(WIN32) + #include <langinfo.h> + #if defined(__LCLINT__) + /*@-declundef -incondefs @*/ +@@ -180,6 +181,8 @@ + /*@*/; + /*@=declundef =incondefs @*/ + #endif ++#elif defined(WIN32) ++#include <windows.h> + #endif + + #if defined(HAVE_DCGETTEXT) && !defined(__LCLINT__) |