aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Innes2000-09-03 17:50:12 +0000
committerAndrew Innes2000-09-03 17:50:12 +0000
commit11c22fffa0c86727fad2b57d2a8f26d6bc026a84 (patch)
treed65926ebd3869157863a74bb72033ee263a6791a /src
parent9a6f5b63a3a3bdcb2f2fb14795403b986c618de3 (diff)
downloademacs-11c22fffa0c86727fad2b57d2a8f26d6bc026a84.tar.gz
emacs-11c22fffa0c86727fad2b57d2a8f26d6bc026a84.zip
(compare_env): Convert to uppercase for comparison,
not lowercase, to match how the native Windows shell works.
Diffstat (limited to 'src')
-rw-r--r--src/w32proc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index 1f7df5e8578..0397e16a80c 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -664,9 +664,11 @@ compare_env (const void *strp1, const void *strp2)
664 664
665 while (*str1 && *str2 && *str1 != '=' && *str2 != '=') 665 while (*str1 && *str2 && *str1 != '=' && *str2 != '=')
666 { 666 {
667 if (tolower (*str1) > tolower (*str2)) 667 /* Sort order in command.com/cmd.exe is based on uppercasing
668 names, so do the same here. */
669 if (toupper (*str1) > toupper (*str2))
668 return 1; 670 return 1;
669 else if (tolower (*str1) < tolower (*str2)) 671 else if (toupper (*str1) < toupper (*str2))
670 return -1; 672 return -1;
671 str1++, str2++; 673 str1++, str2++;
672 } 674 }