Don't call 'mbrtowc' on WINDOWSNT
* src/emacs.c (using_utf8): Don't call 'mbrtowc' on WINDOWSNT systems, as it's not available on Windows 9X.
This commit is contained in:
parent
fb90f46f47
commit
0260d2d2db
1 changed files with 4 additions and 1 deletions
|
@ -358,7 +358,10 @@ setlocale (int cat, char const *locale)
|
||||||
static bool
|
static bool
|
||||||
using_utf8 (void)
|
using_utf8 (void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_WCHAR_H
|
/* We don't want to compile in mbrtowc on WINDOWSNT because that
|
||||||
|
will prevent Emacs from starting on older Windows systems, while
|
||||||
|
the result is known in advance anyway... */
|
||||||
|
#if defined HAVE_WCHAR_H && !defined WINDOWSNT
|
||||||
wchar_t wc;
|
wchar_t wc;
|
||||||
mbstate_t mbs = { 0 };
|
mbstate_t mbs = { 0 };
|
||||||
return mbrtowc (&wc, "\xc4\x80", 2, &mbs) == 2 && wc == 0x100;
|
return mbrtowc (&wc, "\xc4\x80", 2, &mbs) == 2 && wc == 0x100;
|
||||||
|
|
Loading…
Add table
Reference in a new issue