summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-06-30 21:47:29 +0000
committerEric Andersen <andersen@codepoet.org>2003-06-30 21:47:29 +0000
commitb7f428b0156ae733cc99d093b622fb36ce4a562c (patch)
treeb39ade615e6d728fa343bedf1612c4deaa93cd7e
parentc7bf627d09d7a991ba8097cbf7313ea081e3da89 (diff)
Yield to yet another glibc-ism and add __progname
-rw-r--r--libc/misc/internals/__uClibc_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index 9561ac492..1940832d4 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -42,6 +42,7 @@ extern void weak_function __pthread_initialize_minimal(void);
*/
char **__environ = 0;
+const char *__progname = 0;
weak_alias(__environ, environ);
@@ -123,6 +124,8 @@ __uClibc_start_main(int argc, char **argv, char **envp,
* __uClibc_init() regardless, to be sure the right thing happens. */
__uClibc_init();
+ __progname = *argv;
+
#ifdef __UCLIBC_CTOR_DTOR__
/* Arrange for the application's dtors to run before we exit. */
if (app_fini!=NULL) {