X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fsetjmp.h;h=83ad74912304f1a8d74670e03ceff2f20cd17ec8;hb=cea106fb8976d04b916953469439bc58fa111266;hp=6288c84680ec6fc1e9e9371680b55bae2b021dcd;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/include/setjmp.h b/include/setjmp.h index 6288c846..83ad7491 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -6,19 +6,26 @@ extern "C" { #endif #include -typedef unsigned long sigjmp_buf[(1024+sizeof(jmp_buf))/sizeof(long)]; -#ifdef _GNU_SOURCE -#define jmp_buf sigjmp_buf + +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) +typedef unsigned long sigjmp_buf[(128+sizeof(jmp_buf))/sizeof(long)]; +int sigsetjmp (sigjmp_buf, int); +void siglongjmp (sigjmp_buf, int); #endif -int setjmp (jmp_buf); + +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) int _setjmp (jmp_buf); -int sigsetjmp (sigjmp_buf, int); +void _longjmp (jmp_buf, int); +#endif + +int setjmp (jmp_buf); void longjmp (jmp_buf, int); -void _longjmp (jmp_buf, int); -void siglongjmp (sigjmp_buf, int); #define setjmp setjmp #define longjmp longjmp