diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-02-20 09:50:24 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-02-20 09:50:24 +0000 |
commit | 85750cfa27211c684a5c02810d4970818d8cd05e (patch) | |
tree | 699c32b09a667d748daaf74de8b133e65b32bf8b /libc/misc/internals/errno.c | |
parent | 54fd11c1858958a8c9c8cebadb375092a35f2aa0 (diff) |
This is a bit less messy
Diffstat (limited to 'libc/misc/internals/errno.c')
-rw-r--r-- | libc/misc/internals/errno.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/libc/misc/internals/errno.c b/libc/misc/internals/errno.c index 06978c430..fea609168 100644 --- a/libc/misc/internals/errno.c +++ b/libc/misc/internals/errno.c @@ -1,29 +1,14 @@ -#if 0 #include <features.h> -/* Unforunately, this produces noisy warnings... */ -int errno __attribute__ ((section (".bss"))); -int h_errno __attribute__ ((section (".bss"))); -weak_alias(errno, _errno); -weak_alias(h_errno, _h_errno); -#else -__asm__(" -.weak _errno; -_errno = errno -.weak _h_errno; -_h_errno = h_errno - -.bss -.globl errno -.type errno,%object -.size errno,4 -errno: - .space 4 +#undef errno -.bss -.globl h_errno -.type h_errno,%object -.size h_errno,4 -h_errno: - .space 4 -"); +#if 0 +/* Unfortunately, this doesn't work... */ +int h_errno __attribute__ ((section (".bss"))) = 0; +int errno __attribute__ ((section (".bss"))) = 0; +#else +int errno = 0; +int h_errno = 0; #endif + +weak_alias (errno, _errno) +weak_alias(h_errno, _h_errno); |