* 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.
This commit is contained in:
Corinna Vinschen
2010-02-08 09:52:40 +00:00
parent 72e44746dc
commit f5a73638cd
4 changed files with 23 additions and 4 deletions

View File

@@ -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);