From 2926f7b4662409d3445df7c590e80f001b088cc6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 1 May 2013 18:31:53 +0300 Subject: Fix treatment of whitespace after a backslash on MS-Windows. job.c (construct_command_argv_internal): Don't treat a backslash as an escape character before whitespace, if the shell is not a Posix shell. For the description of the problem, see http://lists.gnu.org/archive/html/make-w32/2013-04/msg00014.html. --- job.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'job.c') diff --git a/job.c b/job.c index 5b626b1..b245007 100644 --- a/job.c +++ b/job.c @@ -3076,6 +3076,15 @@ construct_command_argv_internal (char *line, char **restp, char *shell, if (ap == new_argv[i]) p = next_token (p + 1) - 1; } +#ifdef WINDOWS32 + /* Backslash before whitespace is not special if our shell + is not Unixy. */ + else if (isspace (p[1]) && !unixy_shell) + { + *ap++ = *p; + break; + } +#endif else if (p[1] != '\0') { #ifdef HAVE_DOS_PATHS -- cgit v1.2.3