]> code.delx.au - gnu-emacs/commitdiff
src/w32proc.c (w32_compare_strings): Support "C" and "POSIX" locales.
authorEli Zaretskii <eliz@gnu.org>
Mon, 1 Sep 2014 15:07:17 +0000 (18:07 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 1 Sep 2014 15:07:17 +0000 (18:07 +0300)
src/ChangeLog
src/w32proc.c

index ed0edc5f0a1fe1d23355e9b785b19019e73b298e..02435801d69c94690f5d6b4a9cff0087734822f4 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
+       locales.
+
 2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        --enable-silent-rules now suppresses more chatter.
index 399ed009ce34f419749b8f3c0186fc9bd6f72fcf..96f94a116af0b0e20dd05124bf7e1fe7893d3294 100644 (file)
@@ -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)