aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2020-06-01 22:26:33 -0700
committerPaul Eggert2020-06-01 22:26:33 -0700
commite10940f3f14e91e2740b139c1ff2983a88d66cc7 (patch)
treeb2ea1e4ee957458a16235b72c62021dbb2cfd515
parent8c3ed298a0a516ccd80393881f39d94b496c53d9 (diff)
parent0260d2d2dbb2607e7310bdb518b7b6c0f58f5f98 (diff)
downloademacs-e10940f3f14e91e2740b139c1ff2983a88d66cc7.tar.gz
emacs-e10940f3f14e91e2740b139c1ff2983a88d66cc7.zip
Merge from origin/emacs-27
0260d2d2db Don't call 'mbrtowc' on WINDOWSNT
-rw-r--r--src/emacs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 49793fd1e86..45a215b66e2 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;