summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsmith <>2010-08-29 04:50:26 +0000
committerpsmith <>2010-08-29 04:50:26 +0000
commitd7102d27a5724168b0dae313227456cb4acc20b0 (patch)
tree41098ac106108fe97cff44e8e139152f70c99540
parent64bf703722cdb57e391710d492f6e015e7e49873 (diff)
downloadmake-d7102d27a5724168b0dae313227456cb4acc20b0.tar.gz
Set shellflags to a reasonable default if it's not set already.
-rw-r--r--ChangeLog5
-rw-r--r--job.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 392b06af..233be1a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-29 Paul Smith <psmith@gnu.org>
+
+ * job.c (construct_command_argv_internal): If shellflags is not
+ set, choose an appropriate default value. Fixes Savannah bug #30748.
+
2010-08-27 Eli Zaretskii <eliz@gnu.org>
* variable.c (define_automatic_variables) [__MSDOS__ || WINDOWS32]:
diff --git a/job.c b/job.c
index aacfb844..eab91a1b 100644
--- a/job.c
+++ b/job.c
@@ -2434,6 +2434,9 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
if (*line == '\0')
return 0;
+ if (shellflags == 0)
+ shellflags = posix_pedantic ? "-ec" : "-c";
+
/* See if it is safe to parse commands internally. */
if (shell == 0)
shell = default_shell;
@@ -2977,7 +2980,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
#endif /* WINDOWS32 */
if (unixy_shell)
- new_argv = construct_command_argv_internal (new_line, 0, 0, 0, 0, flags, 0);
+ new_argv = construct_command_argv_internal (new_line, 0, 0, 0, 0,
+ flags, 0);
#ifdef __EMX__
else if (!unixy_shell)