|
nsz |
056b01 |
#include <setjmp.h>
|
|
nsz |
056b01 |
#define T(t) (t*)0;
|
|
nsz |
056b01 |
static void f()
|
|
nsz |
056b01 |
{
|
|
nsz |
056b01 |
T(jmp_buf)
|
|
nsz |
0ef264 |
{void(*p)(jmp_buf,int) = longjmp;}
|
|
Szabolcs Nagy |
338079 |
#ifdef setjmp
|
|
Szabolcs Nagy |
338079 |
{int x = setjmp((jmp_buf){0});}
|
|
Szabolcs Nagy |
338079 |
#else
|
|
nsz |
0ef264 |
{int(*p)(jmp_buf) = setjmp;}
|
|
Szabolcs Nagy |
338079 |
#endif
|
|
nsz |
056b01 |
#ifdef _POSIX_C_SOURCE
|
|
nsz |
056b01 |
T(sigjmp_buf)
|
|
nsz |
0ef264 |
{void(*p)(sigjmp_buf,int) = siglongjmp;}
|
|
Szabolcs Nagy |
338079 |
#ifdef sigsetjmp
|
|
Szabolcs Nagy |
338079 |
{int x = sigsetjmp((sigjmp_buf){0});}
|
|
Szabolcs Nagy |
338079 |
#else
|
|
nsz |
0ef264 |
{int(*p)(sigjmp_buf,int) = sigsetjmp;}
|
|
nsz |
056b01 |
#endif
|
|
Szabolcs Nagy |
338079 |
#endif
|
|
Szabolcs Nagy |
7ab89d |
#if defined _XOPEN_SOURCE && defined OBSOLETE
|
|
Szabolcs Nagy |
7ab89d |
{void(*p)(jmp_buf,int) = _longjmp;}
|
|
Szabolcs Nagy |
338079 |
#ifdef _setjmp
|
|
Szabolcs Nagy |
338079 |
{int x = _setjmp((jmp_buf){0});}
|
|
Szabolcs Nagy |
338079 |
#else
|
|
Szabolcs Nagy |
7ab89d |
{int(*p)(jmp_buf) = _setjmp;}
|
|
Szabolcs Nagy |
7ab89d |
#endif
|
|
Szabolcs Nagy |
338079 |
#endif
|
|
nsz |
056b01 |
}
|