1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-30 21:21:45 +02:00
libunwind-eh_elf/src/setjmp
Konstantin Belousov 2b606faa21 Fix compilation on non-glibc machines.
Commit 297d9cd07d (Fix for failing test-setjmp)
breaks non glibc systems, since __GLIBC_PREREQ is not defined there.
As a consequence, preprocessor aborts with an error.

Trying to hide __GLIBC_PREREQ under #ifdef __GLIBC would require
either code duplication, or moving the longjmp implementation into
the separate file, which is included twice. In fact, I am not sure
in any use of the __GLIBC_PREREQ at the compile time, because the
compiled code can be run on the later version of glibc.

Below is the patch, tested on FreeBSD x86/x86_64 and Scientific Linux 6.1
x86_64. I compile the code always, but keep it in under unused static
symbol. In principle, the code could be optimized out by linker.

[ Minor formatting edits: asharma@fb.com ]
2011-11-30 21:59:09 -08:00
..
longjmp.c Fix compilation on non-glibc machines. 2011-11-30 21:59:09 -08:00
setjmp.c Rename: src/setjmp.c -> src/setjmp/setjmp.c 2005-05-03 09:13:17 +00:00
setjmp_i.h Fix missed merge on setjmp_i.h and siglongjmp.c. 2006-07-26 15:21:52 -06:00
siglongjmp.c Fix compilation on non-glibc machines. 2011-11-30 21:59:09 -08:00
sigsetjmp.c Rename: src/sigsetjmp.c -> src/setjmp/sigsetjmp.c 2005-05-03 09:13:17 +00:00