ソースを参照

Yield to yet another glibc-ism and add __progname

Eric Andersen 21 年 前
コミット
b7f428b015
1 ファイル変更3 行追加0 行削除
  1. 3 0
      libc/misc/internals/__uClibc_main.c

+ 3 - 0
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) {