Re: [PATCH] progname: also set global program_invocation_name, when possible

2009-10-04 Thread Bruno Haible
Jim Meyering wrote on 2009-08-25: > No. That package *does* use the error module. > However, per m4/error.m4, when building on a glibc-based system, > error.c is not compiled. > > Your addition to this comment made it misleading: > > /* On glibc systems, when the gnulib module 'error' is not u

Re: [PATCH] progname: also set global program_invocation_name, when possible

2009-08-25 Thread Sergey Poznyakoff
Hi Jim, > I have no control over glibc's error, and it uses program_invocation_name, > not program_invocation_short_name, so in order to make diagnostics appear like > > program_name: > > rather than > > /abs/dir.../.libs/lt-program_name: > > the set_program_name function mus

Re: [PATCH] progname: also set global program_invocation_name, when possible

2009-08-25 Thread Jim Meyering
Sergey Poznyakoff wrote: >> +#if HAVE_DECL_PROGRAM_INVOCATION_NAME >> + program_invocation_name = (char *) argv0; >> +#endif > > In my opinion, that's not correct. Libc (and gnulib's argp, FWIW) uses > two variables: program_invocation_name, which points to the full program > name as obtained fro

Re: [PATCH] progname: also set global program_invocation_name, when possible

2009-08-25 Thread Sergey Poznyakoff
Hello, > +#if HAVE_DECL_PROGRAM_INVOCATION_NAME > + program_invocation_name = (char *) argv0; > +#endif In my opinion, that's not correct. Libc (and gnulib's argp, FWIW) uses two variables: program_invocation_name, which points to the full program name as obtained from argv[0], and program_inv

Re: [PATCH] progname: also set global program_invocation_name, when possible

2009-08-25 Thread Jim Meyering
Bruno Haible wrote: >> +2009-08-24 Jim Meyering >> + >> +progname: also set global program_invocation_name, when possible >> +Before this change, a libtool-enabled program that calls glibc's >> +error function would report the program name as >> +"/abs/dir/.libs/lt-program_name"

Re: [PATCH] progname: also set global program_invocation_name, when possible

2009-08-24 Thread Bruno Haible
Hi Jim, > +2009-08-24 Jim Meyering > + > + progname: also set global program_invocation_name, when possible > + Before this change, a libtool-enabled program that calls glibc's > + error function would report the program name as > + "/abs/dir/.libs/lt-program_name" rather than t

[PATCH] progname: also set global program_invocation_name, when possible

2009-08-24 Thread Jim Meyering
ubject: [PATCH] progname: also set global program_invocation_name, when possible Before this change, a libtool-enabled program that calls glibc's error function would report the program name as "/abs/dir/.libs/lt-program_name" rather than the desired program_name. * modules/prognam