diff options
author | Paul Smith <psmith@gnu.org> | 2004-11-28 16:58:51 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2004-11-28 16:58:51 +0000 |
commit | d27cac1598207e9bfc3ffb47c7e609360b83ca69 (patch) | |
tree | da1d6e91e840cf70f2af6c96e61dd3cee7b44a95 | |
parent | e8e4c19873445d9f4efd3e45ede0e11a46899f50 (diff) | |
download | gunmake-d27cac1598207e9bfc3ffb47c7e609360b83ca69.tar.gz |
Fix WINDOWS32 bug #11155 with patch from Alessandro Vesely.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | main.c | 11 |
2 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2004-11-28 Paul D. Smith <psmith@gnu.org> + + * main.c (find_and_set_default_shell) [WINDOWS32]: check for + equality of "cmd"/"cmd.exe", not inequality. Fixes bug #11155. + Patch by Alessandro Vesely. + 2004-11-12 Paul D. Smith <psmith@gnu.org> * job.c (child_execute_job) [VMS]: Don't treat "#" as a comment on @@ -718,11 +718,11 @@ find_and_set_default_shell (char *token) if (((tokend == search_token || (tokend > search_token && (tokend[-1] == '/' || tokend[-1] == '\\'))) - && strcmpi (tokend, "cmd")) + && !strcmpi (tokend, "cmd")) || ((tokend - 4 == search_token || (tokend - 4 > search_token && (tokend[-5] == '/' || tokend[-5] == '\\'))) - && strcmpi (tokend - 4, "cmd.exe"))) { + && !strcmpi (tokend - 4, "cmd.exe"))) { batch_mode_shell = 1; unixy_shell = 0; sh_found = 0; @@ -1071,8 +1071,11 @@ main (int argc, char **argv, char **envp) We used to rely on target_environment's v_default code to do this. But that does not work for the case where an environment variable is redefined in a makefile with `override'; it should then still - be exported, because it was originally in the environment. */ - ->export = v_export; + be exported, because it was originally in the environment. + Another wrinkle is that POSIX says the value of SHELL set in the + makefile should not change the value of SHELL given to + subprocesses, which seems silly to me but... */ + ->export = strncmp(envp[i], "SHELL=", 6) ? v_noexport : v_export; } #ifdef WINDOWS32 /* |