summaryrefslogtreecommitdiff
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-09-01 18:07:17 +0300
committerEli Zaretskii <eliz@gnu.org>2014-09-01 18:07:17 +0300
commit4ef0411746dde0e18a7a4d11e4fd1c2abdba2b9f (patch)
tree87738fc3f2e4cdbd24f49e3c1d2400f43aa2f730 /src/w32proc.c
parentcd6f709c4b2be2044df54969f8302278a6c8c42a (diff)
downloademacs-4ef0411746dde0e18a7a4d11e4fd1c2abdba2b9f.tar.gz
src/w32proc.c (w32_compare_strings): Support "C" and "POSIX" locales.
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index 399ed009ce3..96f94a116af 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -3236,6 +3236,13 @@ w32_compare_strings (const char *s1, const char *s2, char *locname,
USE_SAFE_ALLOCA;
+ /* The LCID machinery doesn't seem to support the "C" locale, so we
+ need to do that by hand. */
+ if (locname
+ && ((locname[0] == 'C' && (locname[1] == '\0' || locname[1] == '.'))
+ || strcmp (locname, "POSIX") == 0))
+ return (ignore_case ? stricmp (s1, s2) : strcmp (s1, s2));
+
if (!g_b_init_compare_string_w)
{
if (os_subtype == OS_9X)