X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=blobdiff_plain;f=src%2Fapi%2Fsetjmp.c;h=6b956c73ebd75e72a18d0d3faa6b73a64057dbab;hp=afcf16438912246ec411ad994bcae509eab22d97;hb=338079caa555f160e40cca45fc2c8fe455195e3a;hpb=ca59019d8bafde77986d00352951bc6acd2bcf97 diff --git a/src/api/setjmp.c b/src/api/setjmp.c index afcf164..6b956c7 100644 --- a/src/api/setjmp.c +++ b/src/api/setjmp.c @@ -4,14 +4,26 @@ static void f() { T(jmp_buf) {void(*p)(jmp_buf,int) = longjmp;} +#ifdef setjmp +{int x = setjmp((jmp_buf){0});} +#else {int(*p)(jmp_buf) = setjmp;} +#endif #ifdef _POSIX_C_SOURCE T(sigjmp_buf) {void(*p)(sigjmp_buf,int) = siglongjmp;} +#ifdef sigsetjmp +{int x = sigsetjmp((sigjmp_buf){0});} +#else {int(*p)(sigjmp_buf,int) = sigsetjmp;} #endif +#endif #if defined _XOPEN_SOURCE && defined OBSOLETE {void(*p)(jmp_buf,int) = _longjmp;} +#ifdef _setjmp +{int x = _setjmp((jmp_buf){0});} +#else {int(*p)(jmp_buf) = _setjmp;} #endif +#endif }