[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: |
Bruno Haible |
Subject: |
Re: error.c has an unnecessary dependency on "program_name" |
Date: |
Mon, 8 Nov 2010 00:55:18 +0100 |
User-agent: |
KMail/1.9.9 |
Hi Bruce,
> > 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).
... and HP-UX, which also is a non-ELF platform.
> Not having MacOS or Woe32, I couldn't know.
There is some code for determining the program's name ad-hoc for MacOS X
and Woe32 in progreloc.c. But for HP-UX, I don't know...
If you don't have access to these systems and no one else find a good
solution, then you will likely have to document: "Before using libposix,
you have to invoke set_program_name(argv[0]);" and add the module 'progname'
to libposix. I think that's an acceptable compromise: many users of gnulib
have done the same for the last 7 years.
> > 2) Substituting "unknown" instead of a real program name will not help the
> > end user.
>
> Seg faulting is even less friendly.
A seg fault is a very clear hint to the developer that he needs to fix up his
code. Which IMO is the only good solution if a programmer has not defined
program_name.
Bruno
- error.c has an unnecessary dependency on "program_name", Bruce Korb, 2010/11/07
- Re: error.c has an unnecessary dependency on "program_name", Bruno Haible, 2010/11/07
- Re: libposix stuff, Bruce Korb, 2010/11/08
- Re: libposix stuff, Gary V. Vaughan, 2010/11/08
- Re: libposix stuff, Ralf Wildenhues, 2010/11/08
- Re: libposix stuff, Bruce Korb, 2010/11/08
- Re: libposix stuff, Eric Blake, 2010/11/08
- Re: libposix stuff, Bruce Korb, 2010/11/08
- Re: libposix stuff, Thien-Thi Nguyen, 2010/11/09
- Re: libposix stuff, Bastien ROUCARIES, 2010/11/09
- Re: libposix stuff, Bastien ROUCARIES, 2010/11/15