* 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.
(cherry picked from commit
0605107340f96045f8982a30ef5267832f3618e2)
+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-03 Bruno Haible <bruno@clisp.org>
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
2011-06-03 Bruno Haible <bruno@clisp.org>
Copyright: Use LGPL 2.1 instead of LGPL 2.0.
ignores the environment variables @code{LC_ALL}, @code{@var{category}}, and
@code{LANG}.
@item
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
@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
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,
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,
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 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])
esac
if test $REPLACE_SETLOCALE = 1; then
AC_LIBOBJ([setlocale])