Base getprogname() on program_invocation_short_name presence instead of glibc

This commit is contained in:
Guillem Jover
2012-01-03 08:58:01 +01:00
parent d5d9186937
commit 752997462a
2 changed files with 10 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ static const char *__progname = NULL;
const char *
getprogname(void)
{
#ifdef __GLIBC__
#if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME)
if (__progname == NULL)
__progname = program_invocation_short_name;
#elif defined(HAVE_GETEXECNAME)