mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 02:51:31 -08:00
(compare_env): Convert to uppercase for comparison,
not lowercase, to match how the native Windows shell works.
This commit is contained in:
parent
9a6f5b63a3
commit
11c22fffa0
1 changed files with 4 additions and 2 deletions
|
|
@ -664,9 +664,11 @@ compare_env (const void *strp1, const void *strp2)
|
|||
|
||||
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++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue