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

@ -165,6 +165,14 @@
#endif
#if defined(__GLIBC__)
/* glibc uses __errno_location() to get a ptr to errno */
/* We can just memorize it once - no multithreading in busybox :) */
extern int *const bb_errno;
#undef errno
#define errno (*bb_errno)
#endif
#if defined(__GLIBC__) && __GLIBC__ < 2
int vdprintf(int d, const char *format, va_list ap);
#endif