# HG changeset patch # User Richard M. Stallman # Date 843594024 0 # Node ID c987c025d448040e020dc3499a9f1a2aabec3a9e # Parent fea88c3fb20cd5d1b3616e4bc2fd2ba9429ee414 (run_msdos_command): When testing whether a shell belongs to the MSDOS family, convert its name to lower-case. diff -r fea88c3fb20c -r c987c025d448 src/msdos.c --- a/src/msdos.c Tue Sep 24 06:56:29 1996 +0000 +++ b/src/msdos.c Tue Sep 24 19:40:24 1996 +0000 @@ -2682,7 +2682,7 @@ Lisp_Object dir; int tempin, tempout, temperr; { - char *saveargv1, *saveargv2, **envv; + char *saveargv1, *saveargv2, **envv, *lowcase_argv0, *pa, *pl; char oldwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ int msshell, result = -1; int in, out, inbak, outbak, errbak; @@ -2692,7 +2692,19 @@ /* Get current directory as MSDOS cwd is not per-process. */ getwd (oldwd); - cmd = Ffile_name_nondirectory (build_string (argv[0])); + /* If argv[0] is the shell, it might come in any lettercase. + Since `Fmember' is case-sensitive, we need to downcase + argv[0], even if we are on case-preserving filesystems. */ + lowcase_argv0 = alloca (strlen (argv[0]) + 1); + for (pa = argv[0], pl = lowcase_argv0; *pa; pl++) + { + *pl = *pa++; + if (*pl >= 'A' && *pl <= 'Z') + *pl += 'a' - 'A'; + } + *pl = '\0'; + + cmd = Ffile_name_nondirectory (build_string (lowcase_argv0)); msshell = !NILP (Fmember (cmd, Fsymbol_value (intern ("msdos-shells")))) && !strcmp ("-c", argv[1]); if (msshell)