progname: also set global program_invocation_name, when possible.
authorJim Meyering <meyering@redhat.com>
Mon, 24 Aug 2009 23:02:32 +0000 (01:02 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 24 Aug 2009 23:03:33 +0000 (01:03 +0200)
commit9cedf3e1ac7dbdddefb7e172156e9000de7d80c2
tree5d0e6f4e157bcbb515a2411732cfd65712030678
parentd7b888c523416aea3590d7b74fbe4e3426a742c7
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/progname (configure.ac): Check for a declaration of
program_invocation_name.
* lib/progname.c:  Include <errno.h>.
(set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]:
Set program_invocation_name.
ChangeLog
lib/progname.c
modules/progname