Use system __progname variable in progname module if available

This commit is contained in:
Guillem Jover
2011-07-06 16:29:26 +02:00
parent b5cc17d664
commit 8723226040
2 changed files with 13 additions and 0 deletions

View File

@@ -33,7 +33,11 @@
#include <string.h>
#include <stdlib.h>
#ifdef HAVE___PROGNAME
extern const char *__progname;
#else
static const char *__progname = NULL;
#endif
const char *
getprogname(void)