diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2007-09-24 14:18:18 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2007-09-24 14:18:18 -0700 |
| commit | a81fb89a445ae0dca286c861d8d51f705533df0d (patch) | |
| tree | a8b2ae9b656b482c822fbdf75f0f16c1d43945a7 /com32/include/setjmp.h | |
| parent | 3ac4d898c0dee05c6e2d00e4ecbf208dbd4915e8 (diff) | |
| download | syslinux-3.52.tar.gz | |
Fix building on a 64-bit system without a 32-bit system installedsyslinux-3.52-pre10syslinux-3.52
A bunch of glibc header files were bogusly included. We should not
depend on having a 32-bit glibc installed, since we don't use it.
Diffstat (limited to 'com32/include/setjmp.h')
| -rw-r--r-- | com32/include/setjmp.h | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/com32/include/setjmp.h b/com32/include/setjmp.h index b504eb6d..11b18fbd 100644 --- a/com32/include/setjmp.h +++ b/com32/include/setjmp.h @@ -8,36 +8,15 @@ #include <klibc/extern.h> #include <klibc/compiler.h> #include <stddef.h> -#include <signal.h> #include <klibc/archsetjmp.h> __extern int setjmp(jmp_buf); __extern __noreturn longjmp(jmp_buf, int); -/* - Whose bright idea was it to add unrelated functionality to just about - the only function in the standard C library (setjmp) which cannot be - wrapped by an ordinary function wrapper? Anyway, the damage is done, - and therefore, this wrapper *must* be inline. However, gcc will - complain if this is an inline function for unknown reason, and - therefore sigsetjmp() needs to be a macro. -*/ - -struct __sigjmp_buf { - jmp_buf __jmpbuf; - sigset_t __sigs; -}; - -typedef struct __sigjmp_buf sigjmp_buf[1]; - -#define sigsetjmp(__env, __save) \ -({ \ - struct __sigjmp_buf *__e = (__env); \ - sigprocmask(0, NULL, &__e->__sigs); \ - setjmp(__e->__jmpbuf); \ -}) +typedef jmp_buf sigjmp_buf; -__extern __noreturn siglongjmp(sigjmp_buf, int); +#define sigsetjmp(__env, __save) setjmp(__env) +#define siglongjmp(__env, __val) longjmp(__env, __val) #endif /* _SETJMP_H */ |
