Eric Blake <[EMAIL PROTECTED]> wrote: > Jim Meyering <jim <at> meyering.net> writes: > >> >>> >> >>> http://www.pixelbeat.org/patches/coreutils-timeout.diff >> >> Thanks again! >> I've tweaked the log message and pushed the result. > > This needs a patch before it can build on cygwin and other non-glibc > platforms: > > gcc -std=gnu99 -gdwarf-2 -Wall -Werror -Wl,--as-needed -o timeout.exe > timeout.o operand2sig.o ../lib/libcoreutils.a /usr/local/lib/libintl.dll.a - > liconv -L/usr/local/lib ../lib/libcoreutils.a > ../lib/libcoreutils.a(error.o): In function `error': > /home/eblake/coreutils/lib/error.c:250: undefined reference to `_program_name' > > Sounds like a 'make syntax-check' rule on top of this patch would be > worthwhile, although I didn't tackle that...
Definitely. There's some minor inconsistencies asking for attention: $ grep -l '^main (' src/*.c|xargs grep -L '^char \*program_name;' src/fmt.c src/pinky.c src/shred.c $ grep '\*program_name;' fmt.c pinky.c shred.c fmt.c:const char *program_name; pinky.c:const char *program_name; shred.c:char const *program_name; /* Initialized before any possible use */ I'll make things consistent and add a rule to prevent further mishap. >>From f714d3c1c2ef5944bb12cf567340f487331987b4 Mon Sep 17 00:00:00 2001 > From: Eric Blake <[EMAIL PROTECTED]> > Date: Mon, 2 Jun 2008 07:53:26 -0600 > Subject: [PATCH] Export program_name, required by gnulib. Thanks! Pushed with no-starting-capital and no period at end of the one-line summary. I'm slowly coming around to this small aspect of git's own commit-summary guidelines. BTW, your patch didn't apply, due to one mail-client-split line. Easy to fix. > * src/timeout.c (program_name): Export. > > Signed-off-by: Eric Blake <[EMAIL PROTECTED]> > --- > src/timeout.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/timeout.c b/src/timeout.c > index 19ec849..d7e3441 100644 > --- a/src/timeout.c > +++ b/src/timeout.c > @@ -82,7 +82,8 @@ static int timed_out; > static int term_signal = SIGTERM; /* same default as kill command. */ > static int monitored_pid; > static int sigs_to_ignore[NSIG]; /* so monitor can ignore sigs it resends. > */ > -static char *program_name; > + > +char *program_name; > > static struct option const long_options[] = { > {"signal", required_argument, NULL, 's'}, _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils