]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Restrict the usable locales on Cygwin.
authorBruno Haible <bruno@clisp.org>
Wed, 17 Oct 2007 15:21:28 +0000 (15:21 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:19 +0000 (12:15 +0200)
gettext-tools/m4/ChangeLog
gettext-tools/m4/locale-ja.m4

index b6f1ecbce3e41c6899f665438137cc599314fbb3..f8a4f6d18da9537b5da9aa22364452b660023fed 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-17  Bruno Haible  <bruno@clisp.org>
+
+       * locale-ja.m4 (gt_LOCALE_JA): On Cygwin, don't allow locale names
+       without encoding suffix.
+
 2007-06-07  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (aclocal_DATA): Add intlmacosx.m4.
index 4c8108265ae22be8098f5186d81a11c54fb60122..d3e3e273865c80fcf31ff3f2b623d1a9a6cbb89d 100644 (file)
@@ -1,4 +1,4 @@
-# locale-ja.m4 serial 2 (gettext-0.16.2)
+# locale-ja.m4 serial 3 (gettext-0.16.2)
 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,
@@ -37,6 +37,8 @@ changequote(,)dnl
 #if HAVE_LANGINFO_CODESET
 # include <langinfo.h>
 #endif
+#include <stdlib.h>
+#include <string.h>
 struct tm t;
 char buf[16];
 int main ()
@@ -49,6 +51,11 @@ int main ()
      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.  */
 #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.  */
+  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.  */