X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Flocale-zh.m4;h=5e7c004af4e22fc912af10569eb41f954e8e39ef;hb=e74e1f1540f02fc57e442a6281c62f9594af15e5;hp=187ad3510549da4d9597ebbf03b3c73830991421;hpb=e2bbeae93fe65870b47c4349d59ab567c8f155b2;p=gnulib.git diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4 index 187ad3510..5e7c004af 100644 --- a/m4/locale-zh.m4 +++ b/m4/locale-zh.m4 @@ -1,4 +1,4 @@ -# locale-zh.m4 serial 2 +# locale-zh.m4 serial 3 dnl Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -38,6 +38,8 @@ changequote(,)dnl #if HAVE_LANGINFO_CODESET # include #endif +#include +#include struct tm t; char buf[16]; int main () @@ -51,6 +53,12 @@ int main () #if HAVE_LANGINFO_CODESET if (nl_langinfo (CODESET) [0] == '\0') return 1; #endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;