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:
Denis Vlasenko
2007-05-31 22:16:38 +00:00
parent c2f011aa03
commit fad2b86c9e
16 changed files with 23 additions and 83 deletions

View File

@ -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