summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-02-08 09:52:40 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-02-08 09:52:40 +0000
commitf5a73638cd98e01bad97fb3f1a69ffef7d07c1c5 (patch)
treec3dc1e5211fd31da6c2f133b8decb0c923a59648
parent72e44746dce11fd1bbc10fcb68b8f2a5aa7aba51 (diff)
downloadcygnal-f5a73638cd98e01bad97fb3f1a69ffef7d07c1c5.tar.gz
cygnal-f5a73638cd98e01bad97fb3f1a69ffef7d07c1c5.tar.bz2
cygnal-f5a73638cd98e01bad97fb3f1a69ffef7d07c1c5.zip
* external.cc (cygwin_internal): Add CW_INT_SETLOCALE case to
allow to call internal_setlocale(). * nlsfuncs.cc (internal_setlocale): Make externally available. * include/cygwin/version.h: Bump API minor number. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_INT_SETLOCALE. * nlsfuncs.cc (lc_mbstowcs): Fix call to f_mbtowc. (__set_locale_from_locale_alias): Ignore "@cjknarrow" modifier.
-rw-r--r--winsup/cygwin/ChangeLog11
-rw-r--r--winsup/cygwin/external.cc8
-rw-r--r--winsup/cygwin/include/cygwin/version.h3
-rw-r--r--winsup/cygwin/include/sys/cygwin.h5
4 files changed, 23 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8ff6524eb..fe966c48d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * external.cc (cygwin_internal): Add CW_INT_SETLOCALE case to
+ allow to call internal_setlocale().
+ * nlsfuncs.cc (internal_setlocale): Make externally available.
+ * include/cygwin/version.h: Bump API minor number.
+ * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_INT_SETLOCALE.
+
+ * nlsfuncs.cc (lc_mbstowcs): Fix call to f_mbtowc.
+ (__set_locale_from_locale_alias): Ignore "@cjknarrow" modifier.
+
2010-02-07 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__get_lcid_from_locale): Handle "@cyrillic" modifier
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 4d7f03d1b..bbf675a64 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -1,7 +1,7 @@
/* external.cc: Interface to Cygwin internals from external programs.
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
Written by Christopher Faylor <cgf@cygnus.com>
@@ -468,6 +468,12 @@ cygwin_internal (cygwin_getinfo_types t, ...)
res = 0;
}
break;
+ case CW_INT_SETLOCALE:
+ {
+ extern void internal_setlocale ();
+ internal_setlocale ();
+ res = 0;
+ }
default:
set_errno (ENOSYS);
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index f846ac22e..44d660430 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -375,12 +375,13 @@ details. */
219: Export dup3, pipe2, O_CLOEXEC, F_DUPFD_CLOEXEC.
220: Export accept4, SOCK_CLOEXEC, SOCK_NONBLOCK.
221: Export strfmon.
+ 222: CW_INT_SETLOCALE added.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 221
+#define CYGWIN_VERSION_API_MINOR 222
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index 60fc9f05e..6c04dc8e1 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -1,7 +1,7 @@
/* sys/cygwin.h
Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009 Red Hat, Inc.
+ 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
@@ -145,7 +145,8 @@ typedef enum
CW_SETERRNO,
CW_EXIT_PROCESS,
CW_SET_EXTERNAL_TOKEN,
- CW_GET_INSTKEY
+ CW_GET_INSTKEY,
+ CW_INT_SETLOCALE
} cygwin_getinfo_types;
/* Token type for CW_SET_EXTERNAL_TOKEN */