From 9a7fe22b197770271a2235062fe52cb1c71a3d9e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 Apr 2013 19:17:07 +0300 Subject: Fix the .ONESHELL operation on MS-Windows. job.c (construct_command_argv_internal) [WINDOWS32]: Return right after generating new_argv for one_shell case. This fixes the Windows build for both Unixy shell and stock Windows shells. --- job.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'job.c') diff --git a/job.c b/job.c index 91da29b..2a470b6 100644 --- a/job.c +++ b/job.c @@ -3335,7 +3335,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell, *t = '\0'; } #ifdef WINDOWS32 - else /* non-Posix shell */ + else /* non-Posix shell (cmd.exe etc.) */ { const char *f = line; char *t = line; @@ -3404,8 +3404,9 @@ construct_command_argv_internal (char *line, char **restp, char *shell, new_argv = xmalloc (2 * sizeof (char *)); new_argv[0] = xstrdup (*batch_filename); new_argv[1] = NULL; + return new_argv; } -#else /* WINDOWS32 */ +#endif /* WINDOWS32 */ /* Create an argv list for the shell command line. */ { int n = 0; @@ -3429,7 +3430,6 @@ construct_command_argv_internal (char *line, char **restp, char *shell, new_argv[n++] = line; new_argv[n++] = NULL; } -#endif /* WINDOWS32 */ return new_argv; } -- cgit v1.2.3