Compare internal commands of non-Unix shells on Windows case-insensitively.
authorEli Zaretskii <eliz@gnu.org>
Sat, 22 Jun 2013 13:22:25 +0000 (16:22 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 22 Jun 2013 13:22:25 +0000 (16:22 +0300)
 job.c (construct_command_argv_internal) [WINDOWS32]: Use
 case-insensitive comparison with internal commands of non-Unix
 shells.

ChangeLog
job.c

index c01a3233faf2155d8c15e073a2bea08d38779ed1..17a68f2c260fac959c286bb8f48209e708bc6408 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-06-22  Eli Zaretskii  <eliz@gnu.org>
 
+       * job.c (construct_command_argv_internal) [WINDOWS32]: Use
+       case-insensitive comparison with internal commands of non-Unix
+       shells.
+
        * main.c (find_and_set_default_shell): Don't use file_exists_p or
        dir_file_exists_p, as those call readdir, which can fail if PATH
        includes directories with non-ASCII characters, and that would
diff --git a/job.c b/job.c
index ef24caa09b0531fbe114bf338032f3f5fa068114..8b1a8dfdf9c0d21ecbe12d24395d6efa5da826e3 100644 (file)
--- a/job.c
+++ b/job.c
@@ -3172,12 +3172,12 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
                   {
                     if (streq (sh_cmds[j], new_argv[0]))
                       goto slow;
-# ifdef __EMX__
+#if defined(__EMX__) || defined(WINDOWS32)
                     /* Non-Unix shells are case insensitive.  */
                     if (!unixy_shell
                         && strcasecmp (sh_cmds[j], new_argv[0]) == 0)
                       goto slow;
-# endif
+#endif
                   }
               }