Juan Manuel Guerrero wrote: > I have tried to compile diffutils using a system that uses popen/pclose to > emulate pipe support. This has failed because the required arguments are not > passed to shell_quote_copy. See patch below. > > diff -aprNU5 diffutils-2.9.orig/src/sdiff.c diffutils-2.9/src/sdiff.c ... > diff -aprNU5 diffutils-2.9.orig/src/util.c diffutils-2.9/src/util.c ...
Thank you! I added a log entry and pushed your change: >From aa56d5f6d086855785d2fe83d148cf090eabee80 Mon Sep 17 00:00:00 2001 From: Juan Manuel Guerrero <[email protected]> Date: Sun, 14 Feb 2010 18:16:25 +0100 Subject: [PATCH] avoid compilation failure on systems lacking both fork and vfork * src/sdiff.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (main): Pass the right number of arguments to shell_quote_copy. * src/util.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (begin_output): Likewise. --- src/sdiff.c | 2 +- src/util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdiff.c b/src/sdiff.c index 84a9a7d..4344e8d 100644 --- a/src/sdiff.c +++ b/src/sdiff.c @@ -629,7 +629,7 @@ main (int argc, char *argv[]) command = p = xmalloc (cmdsize); for (i = 0; diffargv[i]; i++) { - p = shell_quote_copy (diffargv[i]); + p = shell_quote_copy (p, diffargv[i]); *p++ = ' '; } p[-1] = 0; diff --git a/src/util.c b/src/util.c index 90b463d..3be03e9 100644 --- a/src/util.c +++ b/src/util.c @@ -228,7 +228,7 @@ begin_output (void) char *p; sprintf (command, "%s -f -h ", pr_program); p = command + sizeof pr_program - 1 + 7; - p = shell_quote_copy (name); + p = shell_quote_copy (p, name); *p = 0; errno = 0; outfile = popen (command, "w"); -- 1.7.0.169.g57c99
