mirror of
https://github.com/mirror/make.git
synced 2025-03-03 22:30:59 +08:00
Revert "[SV 56449] (Windows) Use slow path if '%' appears in the command"
This reverts commit 38e96eadea
.
Per discussion on Savannah, the modified behavior matches
the way % is handled in batch files, but not in cmd command
lines. And since Make mostly tries to emulate the command
line, the new behavior is unexpected and backward-incompatible.
This commit is contained in:
parent
bde990bfea
commit
271e572ba2
@ -2748,7 +2748,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
||||
can handle quoted file names just fine, removing the quote lifts
|
||||
the limit from a very frequent use case, because using quoted
|
||||
file names is commonplace on MS-Windows. */
|
||||
static const char *sh_chars_dos = "|&<>%";
|
||||
static const char *sh_chars_dos = "|&<>";
|
||||
static const char *sh_cmds_dos[] =
|
||||
{ "assoc", "break", "call", "cd", "chcp", "chdir", "cls", "color", "copy",
|
||||
"ctty", "date", "del", "dir", "echo", "echo.", "endlocal", "erase",
|
||||
@ -2949,9 +2949,9 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
||||
else if (instring == '"' && strchr ("\\$`", *p) != 0 && unixy_shell)
|
||||
goto slow;
|
||||
#ifdef WINDOWS32
|
||||
/* Quoted wildcard and % characters must be passed quoted to the
|
||||
/* Quoted wildcard characters must be passed quoted to the
|
||||
command, so give up the fast route. */
|
||||
else if (instring == '"' && strchr ("*?%", *p) != 0 && !unixy_shell)
|
||||
else if (instring == '"' && strchr ("*?", *p) != 0 && !unixy_shell)
|
||||
goto slow;
|
||||
else if (instring == '"' && strncmp (p, "\\\"", 2) == 0)
|
||||
*ap++ = *++p;
|
||||
|
Loading…
Reference in New Issue
Block a user