mirror of
https://github.com/mirror/make.git
synced 2026-09-05 22:25:00 +08:00
Patch for command line parsing for VMS from Hartmut Becker.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2004-11-12 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* job.c (child_execute_job) [VMS]: Don't treat "#" as a comment on
|
||||||
|
the command line if it's inside a string.
|
||||||
|
Patch by: Hartmut Becker <Hartmut.Becker@hp.com>
|
||||||
|
|
||||||
2004-10-21 Boris Kolpackov <boris@kolpackov.net>
|
2004-10-21 Boris Kolpackov <boris@kolpackov.net>
|
||||||
|
|
||||||
* function.c (func_lastword): New function: return last word
|
* function.c (func_lastword): New function: return last word
|
||||||
@@ -64,7 +70,7 @@
|
|||||||
idea behind Savannah Patch #3144 from david.baird@homemail.com.
|
idea behind Savannah Patch #3144 from david.baird@homemail.com.
|
||||||
If SHELL is set to CMD.EXE then assume it's batch-mode and
|
If SHELL is set to CMD.EXE then assume it's batch-mode and
|
||||||
non-unixy. I wrote the code differently from the patch, though,
|
non-unixy. I wrote the code differently from the patch, though,
|
||||||
to make it safer.
|
to make it safer. This also resolves bug #9174.
|
||||||
|
|
||||||
2004-09-20 Paul D. Smith <psmith@gnu.org>
|
2004-09-20 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
|||||||
11
job.c
11
job.c
@@ -2088,6 +2088,7 @@ child_execute_job (char *argv, struct child *child)
|
|||||||
char ifile[256], ofile[256], efile[256];
|
char ifile[256], ofile[256], efile[256];
|
||||||
char *comname = 0;
|
char *comname = 0;
|
||||||
char procname[100];
|
char procname[100];
|
||||||
|
int in_string;
|
||||||
|
|
||||||
/* Parse IO redirection. */
|
/* Parse IO redirection. */
|
||||||
|
|
||||||
@@ -2109,9 +2110,17 @@ child_execute_job (char *argv, struct child *child)
|
|||||||
pnamedsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
pnamedsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||||
pnamedsc.dsc$b_class = DSC$K_CLASS_S;
|
pnamedsc.dsc$b_class = DSC$K_CLASS_S;
|
||||||
|
|
||||||
|
in_string = 0;
|
||||||
/* Handle comments and redirection. */
|
/* Handle comments and redirection. */
|
||||||
for (p = argv, q = cmd; *p; p++, q++)
|
for (p = argv, q = cmd; *p; p++, q++)
|
||||||
{
|
{
|
||||||
|
if (*p == '"')
|
||||||
|
in_string = !in_string;
|
||||||
|
if (in_string)
|
||||||
|
{
|
||||||
|
*q = *p;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
switch (*p)
|
switch (*p)
|
||||||
{
|
{
|
||||||
case '#':
|
case '#':
|
||||||
@@ -2167,6 +2176,8 @@ child_execute_job (char *argv, struct child *child)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*q = *p;
|
*q = *p;
|
||||||
|
while (isspace ((unsigned char)*--q))
|
||||||
|
*q = '\0';
|
||||||
|
|
||||||
if (strncmp (cmd, "builtin_", 8) == 0)
|
if (strncmp (cmd, "builtin_", 8) == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user