* wincap.h (wincaps::has_always_all_codepages): New element.

* wincap.cc: Implement above element throughout.
	* wchar.h (__sjis_mbtowc): Declare.
	(__eucjp_mbtowc): Ditto.
	(__gbk_mbtowc): Ditto.
	(__kr_mbtowc): Ditto.
	(__big5_mbtowc): Ditto.
	* syscalls.cc (internal_setlocale): Convert to char * function.
	Return parameter by default.  Return NULL if request to use a
	charset can't be satisfied due to missing codepage support in the
	underlying OS.  Fix comment.
	(setlocale): Store original locale.  Restore to original locale if
	internal_setlocale returns NULL.
This commit is contained in:
Corinna Vinschen
2009-07-20 15:44:55 +00:00
parent cb8ee36ae8
commit 20fc2f4936
5 changed files with 71 additions and 6 deletions

View File

@@ -48,6 +48,7 @@ struct wincaps
unsigned has_broken_udf : 1;
unsigned has_console_handle_problem : 1;
unsigned has_broken_alloc_console : 1;
unsigned has_always_all_codepages : 1;
};
class wincapc
@@ -102,6 +103,7 @@ public:
bool IMPLEMENT (has_broken_udf)
bool IMPLEMENT (has_console_handle_problem)
bool IMPLEMENT (has_broken_alloc_console)
bool IMPLEMENT (has_always_all_codepages)
#undef IMPLEMENT
};