summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
committerPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
commite4da30858037b431880263676e8f90b1f8412a38 (patch)
tree2605109d089f52e373bd976391dca85774ae3b21 /job.c
parent7595f38f62afa7ac3451018d865fb251e3ce91c3 (diff)
downloadgunmake-e4da30858037b431880263676e8f90b1f8412a38.tar.gz
Fix from Eli for incorrect value of $(MAKE) on Cygwin.
A few changes from char* to void* where appropriate, and removing of unnecessary casts. Much more work on const-ifying the codebase. This round involves some code changes to make it correct. NOTE!! There will almost certainly be problems on the non-POSIX ports that will need to be addressed after the const changes are finished: they will need to be const-ified properly and there may need to be some changes to allocate memory, etc. as well. The next (last?) big push for this, still to come, is const-ifying the filenames in struct file, struct dep, etc. This will allow us to store file names in the string cache and finally resolve Savannah bug #15182 (make uses too much memory), among other advantages.
Diffstat (limited to 'job.c')
-rw-r--r--job.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/job.c b/job.c
index 79bdb0d..347c8c6 100644
--- a/job.c
+++ b/job.c
@@ -186,8 +186,6 @@ int getgid ();
# endif
#endif
-char *allocated_variable_expand_for_file (char *line, struct file *file);
-
int getloadavg (double loadavg[], int nelem);
int start_remote_job (char **argv, char **envp, int stdin_fd, int *is_remote,
int *id_ptr, int *used_stdin);
@@ -2446,8 +2444,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
*(ap++) = *(p++);
*(ap++) = *p;
}
- /* If there's a TAB here, skip it. */
- if (p[1] == '\t')
+ /* If there's a command prefix char here, skip it. */
+ if (p[1] == cmd_prefix)
++p;
}
else if (*p == '\n' && restp != NULL)
@@ -2496,8 +2494,9 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
/* Throw out the backslash and newline. */
++p;
- /* If there is a tab after a backslash-newline, remove it. */
- if (p[1] == '\t')
+ /* If there is a command prefix after a backslash-newline,
+ remove it. */
+ if (p[1] == cmd_prefix)
++p;
/* If there's nothing in this argument yet, skip any
@@ -2744,7 +2743,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
}
++p;
- if (p[1] == '\t')
+ if (p[1] == cmd_prefix)
++p;
continue;
@@ -2835,8 +2834,9 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
if (q[0] == '\\' && q[1] == '\n')
{
q += 2; /* remove '\\' and '\n' */
- if (q[0] == '\t')
- q++; /* remove 1st tab in the next line */
+ /* Remove any command prefix in the next line */
+ if (q[0] == cmd_prefix)
+ q++;
}
else
*p++ = *q++;