[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of program_name

From: Paul Eggert
Subject: Re: use of program_name
Date: Thu, 05 Jan 2006 15:06:59 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Karl Berry) writes:

> Is it a problem in practice, ie, what are these non-Unix linkers?

I've run into it on IBM mainframe platforms.  You can run into it even
with GCC, if you use -fno-common.  Googling a bit reveals that libtool
1.5 uses -fno-common on Mac OS X (why, I don't know; see

>     This will require revamping pretty much everybody that uses
>     program_name, but I think it's worth the pain.  What do others
>     think?
> Sounds like an uphill battle to me.

The hill shouldn't be steep.  The gnulib tradition is to not worry
about backward-compatibility much, at least for trivial improvements
like this.  The idea is that people can import new gnulib source code
at their convenience.  I realize that at time goes on the hill will
become steeper, but I'd rather keep it as flat as possible if I can.

address@hidden (James Youngman) writes:

> I would prefer an arrangement which results in a compilation or link
> failure if the user (i.e. software maintainer) fails to initialise
> things properly.

Perhaps we could change progname.h so that 'program_name' is a
function that returns the program name, instead of being a global
variable.  That should catch mishaps at link-time, if not before.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]