aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2020-06-01 18:57:39 +0300
committerEli Zaretskii2020-06-01 18:57:39 +0300
commit0260d2d2dbb2607e7310bdb518b7b6c0f58f5f98 (patch)
treec1f7047da8e0d0a4c4babeab895f0f7d36903fb8 /src
parentfb90f46f47731fffaccd02a55826298419609c77 (diff)
downloademacs-0260d2d2dbb2607e7310bdb518b7b6c0f58f5f98.tar.gz
emacs-0260d2d2dbb2607e7310bdb518b7b6c0f58f5f98.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emacs.c b/src/emacs.c
index db3e92a4773..6118ad34454 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -358,7 +358,10 @@ setlocale (int cat, char const *locale)
358static bool 358static bool
359using_utf8 (void) 359using_utf8 (void)
360{ 360{
361#ifdef HAVE_WCHAR_H 361 /* We don't want to compile in mbrtowc on WINDOWSNT because that
362 will prevent Emacs from starting on older Windows systems, while
363 the result is known in advance anyway... */
364#if defined HAVE_WCHAR_H && !defined WINDOWSNT
362 wchar_t wc; 365 wchar_t wc;
363 mbstate_t mbs = { 0 }; 366 mbstate_t mbs = { 0 };
364 return mbrtowc (&wc, "\xc4\x80", 2, &mbs) == 2 && wc == 0x100; 367 return mbrtowc (&wc, "\xc4\x80", 2, &mbs) == 2 && wc == 0x100;