[PATCH] Revert __getopt_initialized hackery

Shaun Jackman sjackman at gmail.com
Fri Jun 2 23:31:00 UTC 2006


Please revert my patch that added the __getopt_initialized hackery to
lash for newlib. Newlib is now using a different getopt implementation
that no longer requires this hack.

Thanks,
Shaun

2006-06-02  Shaun Jackman  <sjackman at gmail.com>

	* shell/lash.c (pseudo_exec) [_NEWLIB_VERSION]: Remove the
	__getopt_initialized hackery.

--- shell/lash.c	cecf69fba78e83f9fcd16423d1f982a684bf5b53
+++ shell/lash.c	a9a72989d31101bcfc710fc0651b4e03269f7606
@@ -1268,12 +1268,6 @@
 	{
 		char** argv_l=child->argv;
 		int argc_l;
-#ifdef _NEWLIB_VERSION
-		/* newlib uses __getopt_initialized for getopt() in
-		 * addition to optind, see newlib/libc/sys/linux/getopt.c
-		 */
-		extern int __getopt_initialized = 0;
-#endif
 		for(argc_l=0;*argv_l!=NULL; argv_l++, argc_l++);
 		optind = 1;
 		run_applet_by_name(name, argc_l, child->argv);
-------------- next part --------------
2006-06-02  Shaun Jackman  <sjackman at gmail.com>

	* shell/lash.c (pseudo_exec) [_NEWLIB_VERSION]: Remove the
	__getopt_initialized hackery.

--- shell/lash.c	cecf69fba78e83f9fcd16423d1f982a684bf5b53
+++ shell/lash.c	a9a72989d31101bcfc710fc0651b4e03269f7606
@@ -1268,12 +1268,6 @@
 	{
 		char** argv_l=child->argv;
 		int argc_l;
-#ifdef _NEWLIB_VERSION
-		/* newlib uses __getopt_initialized for getopt() in
-		 * addition to optind, see newlib/libc/sys/linux/getopt.c
-		 */
-		extern int __getopt_initialized = 0;
-#endif
 		for(argc_l=0;*argv_l!=NULL; argv_l++, argc_l++);
 		optind = 1;
 		run_applet_by_name(name, argc_l, child->argv);


More information about the busybox mailing list