diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h index e51f81a5a0..b15fc5e90b 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h @@ -21,6 +21,10 @@ # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." #endif +#include <bits/wordsize.h> + +#if __WORDSIZE == 64 + #include <sys/ucontext.h> typedef ucontext_t __jmp_buf[1]; @@ -29,3 +33,22 @@ typedef ucontext_t __jmp_buf[1]; containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp) + +#else + +#if defined __USE_MISC || defined _ASM +# define JB_SP 0 +# define JB_FP 1 +# define JB_PC 2 +#endif + +#ifndef _ASM +typedef int __jmp_buf[3]; +#endif + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((int) (address) < (jmpbuf)[JB_SP]) + +#endif |