summaryrefslogtreecommitdiffstats
path: root/test-progname.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-progname.c')
-rw-r--r--test-progname.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test-progname.c b/test-progname.c
index 79add7eb..0418b3c0 100644
--- a/test-progname.c
+++ b/test-progname.c
@@ -1,9 +1,10 @@
-#include <string.h>
-
-extern char *__progname;
+#include <stdlib.h>
int
main(void)
{
- return !!strcmp(__progname, "test-progname");
+ const char * progname;
+
+ progname = getprogname();
+ return progname == NULL;
}