[Top][All Lists]

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

Re: error.c has an unnecessary dependency on "program_name"

From: Bruce Korb
Subject: Re: error.c has an unnecessary dependency on "program_name"
Date: Sun, 07 Nov 2010 13:24:53 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100914 SUSE/3.0.8 Thunderbird/3.0.8

On 11/07/10 12:40, Bruno Haible wrote:
> No, this is not OK, for two reasons:
>   1) It will cause a link error for all programs that define the 
> 'program_name'
>      variable, on all non-ELF platforms (mainly MacOS X and Woe32).

Not having MacOS or Woe32, I couldn't know.

>   2) Substituting "unknown" instead of a real program name will not help the
>      end user.

Seg faulting is even less friendly.  Perhaps "(NULL)" as some
libraries do?  One could go grubbing around in /proc/$$/exe
but I'm trying to keep stuff out of libposix that isn't posix.
If it isn't possible, it isn't possible.  Still, it does not seem
like removing the hard dependency should be all that hard.

The problem being is that we have two scenarios for libposix clients:
1. one that defines program_invocation_name
2. one that does not
How do I cope?

I am actually more interested in the two printf test failures.
I've beat my head on it for a bit.It seems that if I invoke the
test correctly (TESTS=test-dprintf-posix2.sh with the ".sh" suffix),
the failure ultimately boils down to the program exiting with
an exit code of "1", which might be an allocation failure or a
dprintf failure.  There is no visible output, so I cannot say.

Thanks - Bruce

reply via email to

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