setlocale: Enable replacement on Cygwin 1.5.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Jun 2011 10:07:57 +0000 (12:07 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Jun 2011 10:07:57 +0000 (12:07 +0200)
* m4/setlocale.m4 (gl_FUNC_SETLOCALE): Set REPLACE_SETLOCALE also on
Cygwin 1.5.x.
* doc/posix-functions/setlocale.texi: Mention that the problem with the
LC_CTYPE category also exists on Cygwin 1.5.x.

ChangeLog
doc/posix-functions/setlocale.texi
m4/setlocale.m4

index 849ed2dff1d0f318b4c8f046189690dc8f4bd298..a412e01367e09d98cfd6b5032e253223e712cb55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-06-04  Bruno Haible  <bruno@clisp.org>
+
+       setlocale: Enable replacement on Cygwin 1.5.
+       * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Set REPLACE_SETLOCALE also on
+       Cygwin 1.5.x.
+       * doc/posix-functions/setlocale.texi: Mention that the problem with the
+       LC_CTYPE category also exists on Cygwin 1.5.x.
+
 2011-06-04  Bruno Haible  <bruno@clisp.org>
 
        strerror-override: Don't disable symbol renamings.
index c54018e159338215dc9b6d8229d009f9e001ca37..ee4d477906ff5336402a49c99b938e3ba36dfaad 100644 (file)
@@ -13,9 +13,9 @@ On Windows platforms (excluding Cygwin), @code{setlocale(@var{category},NULL)}
 ignores the environment variables @code{LC_ALL}, @code{@var{category}}, and
 @code{LANG}.
 @item
-On Windows platforms (excluding Cygwin), @code{setlocale(LC_ALL,@var{name})}
-succeeds and sets the LC_CTYPE category to @samp{C} when it does not support
-the encoding, instead of failing.
+On Windows platforms (excluding Cygwin) and Cygwin 1.5.x,
+@code{setlocale(LC_ALL,@var{name})} succeeds and sets the LC_CTYPE category to
+@samp{C} when it does not support the encoding, instead of failing.
 @item
 On Windows platforms (excluding Cygwin), @code{setlocale} understands different
 locale names, that are not based on ISO 639 language names and ISO 3166 country
index cc3ab776f21742f2d6d1fd74449ce3a9f3468670..92f76f433cb53a09b70b4238be66335121c474c6 100644 (file)
@@ -1,4 +1,4 @@
-# setlocale.m4 serial 2
+# setlocale.m4 serial 3
 dnl Copyright (C) 2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,13 @@ AC_DEFUN([gl_FUNC_SETLOCALE],
     dnl On native Windows systems, setlocale(category,NULL) does not look at
     dnl the environment variables LC_ALL, category, and LANG.
     mingw*) REPLACE_SETLOCALE=1 ;;
+    dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL)
+    dnl is then still "C".
+    cygwin*)
+      case `uname -r` in
+        1.5.*) REPLACE_SETLOCALE=1 ;;
+      esac
+      ;;
   esac
   if test $REPLACE_SETLOCALE = 1; then
     AC_LIBOBJ([setlocale])