* Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.
* autoload.cc (LocaleNameToLCID): Define. * cygwin.din (strfmon): Export. * nlsfuncs.cc: New file. Define a lot of internal functions called from setlocale. (wcscoll): Implement locale-aware here, using CompareStringW function. (strcoll): Ditto. (wcsxfrm): Implement locale-aware here, usingLCMapStringW function. (strxfrm): Ditto. (__set_charset_from_locale): Replace __set_charset_from_codepage. Return Linux-compatible charset. * strfuncs.cc (__set_charset_from_codepage): Remove. * wchar.h (__set_charset_from_codepage): Drop definition. * wincap.h (wincaps::has_localenames): New element. * wincap.cc: Implement above element throughout. * libc/strfmon.c: New file. * libc/strptime.cc: Remove locale constant strings in favor of access to locale-specifc data. (strptime): Point _CurrentTimeLocale to locale-specific data. Throughout use correct locale-specific format fields for all locale-specific formats. * include/monetary.h: New file. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/* wincap.h: Header for OS capability class.
|
||||
|
||||
Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
|
||||
Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
2009, 2010 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@@ -49,6 +50,7 @@ struct wincaps
|
||||
unsigned has_console_handle_problem : 1;
|
||||
unsigned has_broken_alloc_console : 1;
|
||||
unsigned has_always_all_codepages : 1;
|
||||
unsigned has_localenames : 1;
|
||||
};
|
||||
|
||||
class wincapc
|
||||
@@ -104,6 +106,7 @@ public:
|
||||
bool IMPLEMENT (has_console_handle_problem)
|
||||
bool IMPLEMENT (has_broken_alloc_console)
|
||||
bool IMPLEMENT (has_always_all_codepages)
|
||||
bool IMPLEMENT (has_localenames)
|
||||
|
||||
#undef IMPLEMENT
|
||||
};
|
||||
|
Reference in New Issue
Block a user