[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: timeout command
From: |
Eric Blake |
Subject: |
Re: timeout command |
Date: |
Mon, 2 Jun 2008 21:20:33 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Pádraig Brady <P <at> draigBrady.com> writes:
> BTW why does gnulib require "program_name" to be exported?
The error module uses 'extern char * program_name'; this is provided by default
in glibc (via the name program_invocation_name, which is exported as part of
glibc), but for the rest of the world, it needs external linkage. Gnulib
provides the progname module to provide this, but intentionally omits this
package as a dependency of the error module for the sake of packages that
manually provide it (such as coreutils).
I suppose coreutils could change to use the progname module,
#include "progname.h" in system.h, and change existing instances
of 'program_name = argv[0]' to 'set_program_name (argv[0])'; this would obviate
the need to declare program_name in each application.
Hmm - progname.h claims that program_name is const char *, but error.c uses it
only as char *. I wonder if we should worry about that at all?
> Should this be a syntax-check?
My question, exactly :)
--
Eric Blake