/* Copyright 07/20/98 Sun Microsystems, Inc. All Rights Reserved */ #if !defined(__STD_CSETJMP) && !defined(__STD_SETJMP_H) #define __STD_CSETJMP #include #ifndef _JBLEN /* * The sizes of the jump-buffer (_JBLEN) and the sigjump-buffer * (_SIGJBLEN) are defined by the appropriate, processor specific, * ABI. */ #if defined(i386) || defined(__i386) #define _JBLEN 10 /* ABI value */ #define _SIGJBLEN 128 /* ABI value */ #elif defined(__sparcv9) #define _JBLEN 12 /* ABI value */ #define _SIGJBLEN 19 /* ABI value */ #elif defined(sparc) || defined(__sparc) #define _JBLEN 12 /* ABI value */ #define _SIGJBLEN 19 /* ABI value */ #else #error "ISA not supported" #endif #if defined(_LP64) || defined(_I32LPx) typedef long sigjmp_buf[_SIGJBLEN]; #else typedef int sigjmp_buf[_SIGJBLEN]; #endif #endif /* _JBLEN */ namespace std { // C++ Standard functions and types extern "C" { #ifndef _JBLEN #if defined(i386) || defined(sparc) || defined(__i386) || defined(__sparc) #if defined(_LP64) || defined(_I32LPx) typedef long jmp_buf[_JBLEN]; #else typedef int jmp_buf[_JBLEN]; #endif #else #error "ISA not supported" #endif extern int setjmp(jmp_buf); #pragma unknown_control_flow(setjmp) extern int _setjmp(jmp_buf); #pragma unknown_control_flow(_setjmp) extern void longjmp(jmp_buf, int); extern void _longjmp(jmp_buf, int); #endif /* _JBLEN */ } /* extern C */ } /* namespace std */ #endif /* __STD_setjmp */