--- 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 #if defined(__LCLINT__) /*@-declundef -incondefs @*/ @@ -180,6 +181,8 @@ /*@*/; /*@=declundef =incondefs @*/ #endif +#elif defined(WIN32) +#include #endif #if defined(HAVE_DCGETTEXT) && !defined(__LCLINT__)