diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-05-31 22:16:38 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-05-31 22:16:38 +0000 |
commit | 3ea433409694393b67dd9dee3b184268ab75ac56 (patch) | |
tree | f2d3fe127fb6c3c1d3b919631de6e6ed7cbc1791 /include/libbb.h | |
parent | 2c31c731f0026b9f92dc0e07542fb8e38cad7dd2 (diff) | |
download | busybox-w32-3ea433409694393b67dd9dee3b184268ab75ac56.tar.gz busybox-w32-3ea433409694393b67dd9dee3b184268ab75ac56.tar.bz2 busybox-w32-3ea433409694393b67dd9dee3b184268ab75ac56.zip |
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
git-svn-id: svn://busybox.net/trunk/busybox@18716 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 5e0b438be..385b30f16 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -165,6 +165,14 @@ | |||
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | 167 | ||
168 | #if defined(__GLIBC__) | ||
169 | /* glibc uses __errno_location() to get a ptr to errno */ | ||
170 | /* We can just memorize it once - no multithreading in busybox :) */ | ||
171 | extern int *const bb_errno; | ||
172 | #undef errno | ||
173 | #define errno (*bb_errno) | ||
174 | #endif | ||
175 | |||
168 | #if defined(__GLIBC__) && __GLIBC__ < 2 | 176 | #if defined(__GLIBC__) && __GLIBC__ < 2 |
169 | int vdprintf(int d, const char *format, va_list ap); | 177 | int vdprintf(int d, const char *format, va_list ap); |
170 | #endif | 178 | #endif |