[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: Wed, 04 Jan 2006 10:19:16 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Dave Love <address@hidden> writes:

> Gnulib routines call `error', and on a non-glibc system that's likely
> to use an uninitialized `program_name' since the variable is
> initialized in progname.c, and that's not required.

Under the current approach, it's the caller's responsibility to arrange
for a program_name variable that works, either by using the progname
module, or by rolling their own program_name variable.

> I don't know whether the variable is meant to be set directly or only
> through `set_program_name'.

Either is fine.

> Shouldn't `program_name' be initialized in error.c instead (perhaps to
> a more meaningful value than NULL)?

I suppose it might make sense for error.c to avoid using program_name
if it's null.

reply via email to

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