use "glibc errno" trick not only for ash, but for entire busybox
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes
This commit is contained in:
11
shell/ash.c
11
shell/ash.c
@ -127,13 +127,6 @@ static char optlist[NOPTS];
|
||||
|
||||
/* ============ Misc data */
|
||||
|
||||
#ifdef __GLIBC__
|
||||
/* glibc sucks */
|
||||
static int *dash_errno;
|
||||
#undef errno
|
||||
#define errno (*dash_errno)
|
||||
#endif
|
||||
|
||||
static char nullstr[1]; /* zero length string */
|
||||
static const char homestr[] = "HOME";
|
||||
static const char snlfmt[] = "%s\n";
|
||||
@ -12734,10 +12727,6 @@ int ash_main(int argc, char **argv)
|
||||
struct jmploc jmploc;
|
||||
struct stackmark smark;
|
||||
|
||||
#ifdef __GLIBC__
|
||||
dash_errno = __errno_location();
|
||||
#endif
|
||||
|
||||
#if PROFILE
|
||||
monitor(4, etext, profile_buf, sizeof(profile_buf), 50);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user