bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setlocale on Cygwin 1.5


From: Bruno Haible
Subject: setlocale on Cygwin 1.5
Date: Sat, 4 Jun 2011 12:09:38 +0200
User-agent: KMail/1.9.9

On Cygwin 1.5.25, I'm seeing this test failure:

  setlocale did not fail for implicit ar_SA.ISO-8859-1
  FAIL: test-setlocale2.sh

This fixes it.


2011-06-04  Bruno Haible  <address@hidden>

        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.

--- doc/posix-functions/setlocale.texi.orig     Sat Jun  4 12:05:56 2011
+++ doc/posix-functions/setlocale.texi  Sat Jun  4 12:05:40 2011
@@ -13,9 +13,9 @@
 ignores the environment variables @code{LC_ALL}, @address@hidden, 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,
address@hidden(LC_ALL,@var{name})} succeeds and sets the LC_CTYPE category to
address@hidden 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
--- m4/setlocale.m4.orig        Sat Jun  4 12:05:56 2011
+++ m4/setlocale.m4     Sat Jun  4 11:47:49 2011
@@ -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 @@
     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])

-- 
In memoriam Mordechai Gebirtig <http://en.wikipedia.org/wiki/Mordechai_Gebirtig>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]