# HG changeset patch # User Andrew Innes # Date 968003412 0 # Node ID 547138676a749f1e70a1de2843c1a6c171c04e22 # Parent 7ba96d66b0c5bebb308f5853f833fff7350e4eb5 (compare_env): Convert to uppercase for comparison, not lowercase, to match how the native Windows shell works. diff -r 7ba96d66b0c5 -r 547138676a74 src/w32proc.c --- a/src/w32proc.c Sun Sep 03 17:47:54 2000 +0000 +++ b/src/w32proc.c Sun Sep 03 17:50:12 2000 +0000 @@ -664,9 +664,11 @@ while (*str1 && *str2 && *str1 != '=' && *str2 != '=') { - if (tolower (*str1) > tolower (*str2)) + /* Sort order in command.com/cmd.exe is based on uppercasing + names, so do the same here. */ + if (toupper (*str1) > toupper (*str2)) return 1; - else if (tolower (*str1) < tolower (*str2)) + else if (toupper (*str1) < toupper (*str2)) return -1; str1++, str2++; }