summaryrefslogtreecommitdiff
path: root/function.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-04-01 06:36:40 +0000
committerPaul Smith <psmith@gnu.org>2006-04-01 06:36:40 +0000
commita8f101d0bc354896e410e218db12b449b0447de7 (patch)
treeb161fc78e688e2c08828116dca05cb148af6e305 /function.c
parent367a49591e2b2335f3f5b42e290651d4df77e933 (diff)
downloadgunmake-a8f101d0bc354896e410e218db12b449b0447de7.tar.gz
Release GNU make 3.81.
Update NEWS docs. Enhance the manual to use automake version.texi, and use the canonical FSF copyright features and statement. Some $(realpath ...) tests won't work on Windows; leave them out The jobserver filedescriptor test might fail if some FDs are reserved, so for now comment out that check.
Diffstat (limited to 'function.c')
-rw-r--r--function.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/function.c b/function.c
index 07cbbff..c62f7ab 100644
--- a/function.c
+++ b/function.c
@@ -1390,8 +1390,8 @@ func_value (char *o, char **argv, const char *funcname UNUSED)
/*
\r is replaced on UNIX as well. Is this desirable?
*/
-void
-fold_newlines (char *buffer, int *length)
+static void
+fold_newlines (char *buffer, unsigned int *length)
{
char *dst = buffer;
char *src = buffer;
@@ -1578,7 +1578,6 @@ static char *
func_shell (char *o, char **argv, const char *funcname UNUSED)
{
char* batch_filename = NULL;
- unsigned int i;
#ifdef __MSDOS__
FILE *fpipe;
@@ -1672,9 +1671,8 @@ func_shell (char *o, char **argv, const char *funcname UNUSED)
#endif
{
/* We are the parent. */
-
char *buffer;
- unsigned int maxlen;
+ unsigned int maxlen, i;
int cc;
/* Record the PID for reap_children. */
@@ -1737,17 +1735,15 @@ func_shell (char *o, char **argv, const char *funcname UNUSED)
if (shell_function_completed == -1)
{
- /* This most likely means that the execvp failed,
- so we should just write out the error message
- that came in over the pipe from the child. */
+ /* This likely means that the execvp failed, so we should just
+ write the error message in the pipe from the child. */
fputs (buffer, stderr);
fflush (stderr);
}
else
{
- /* The child finished normally. Replace all
- newlines in its output with spaces, and put
- that in the variable output buffer. */
+ /* The child finished normally. Replace all newlines in its output
+ with spaces, and put that in the variable output buffer. */
fold_newlines (buffer, &i);
o = variable_buffer_output (o, buffer, i);
}
@@ -1779,8 +1775,8 @@ func_shell (char *o, char **argv, const char *funcname)
BPTR child_stdout;
char tmp_output[FILENAME_MAX];
- unsigned int maxlen = 200;
- int cc, i;
+ unsigned int maxlen = 200, i;
+ int cc;
char * buffer, * ptr;
char ** aptr;
int len = 0;