]> err.no Git - util-linux/commit
provide a workaround if program_invocation_short_name is missing
authorFabian Groffen <grobian@gentoo.org>
Tue, 25 Jan 2011 20:40:46 +0000 (21:40 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 31 Jan 2011 14:51:06 +0000 (15:51 +0100)
commita804f444eb6c0a5232e37db3a58193fa2a549cd9
tree027336f80ef190d98ce6c95662f5833b1ebad9af
parenta2b3d0409589d9b3084c0bcaa32a7af07cee715c
provide a workaround if program_invocation_short_name is missing

Try some replacements, such as getexecname() on Solaris and __progname
on BSDs and Darwin.  When not found, base program_invocation_short_name
on the source filename it is used in, as not to require argv[0] to be
passed along.  This latter approach is not dynamic, but doesn't require
code changes for all places where program_invocation_short_name is used
now.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
include/c.h
shlibs/blkid/samples/partitions.c