xref: /third_party/musl/libc-test/src/api/setjmp.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/libc-test/src/api/
1570af302Sopenharmony_ci#include <setjmp.h>
2570af302Sopenharmony_ci#define T(t) (t*)0;
3570af302Sopenharmony_cistatic void f()
4570af302Sopenharmony_ci{
5570af302Sopenharmony_ciT(jmp_buf)
6570af302Sopenharmony_ci{void(*p)(jmp_buf,int) = longjmp;}
7570af302Sopenharmony_ci#ifdef setjmp
8570af302Sopenharmony_ci{int x = setjmp((jmp_buf){0});}
9570af302Sopenharmony_ci#else
10570af302Sopenharmony_ci{int(*p)(jmp_buf) = setjmp;}
11570af302Sopenharmony_ci#endif
12570af302Sopenharmony_ci#ifdef _POSIX_C_SOURCE
13570af302Sopenharmony_ciT(sigjmp_buf)
14570af302Sopenharmony_ci{void(*p)(sigjmp_buf,int) = siglongjmp;}
15570af302Sopenharmony_ci#ifdef sigsetjmp
16570af302Sopenharmony_ci{int x = sigsetjmp((sigjmp_buf){0}, 0);}
17570af302Sopenharmony_ci#else
18570af302Sopenharmony_ci{int(*p)(sigjmp_buf,int) = sigsetjmp;}
19570af302Sopenharmony_ci#endif
20570af302Sopenharmony_ci#endif
21570af302Sopenharmony_ci#if defined _XOPEN_SOURCE && defined OBSOLETE
22570af302Sopenharmony_ci{void(*p)(jmp_buf,int) = _longjmp;}
23570af302Sopenharmony_ci#ifdef _setjmp
24570af302Sopenharmony_ci{int x = _setjmp((jmp_buf){0});}
25570af302Sopenharmony_ci#else
26570af302Sopenharmony_ci{int(*p)(jmp_buf) = _setjmp;}
27570af302Sopenharmony_ci#endif
28570af302Sopenharmony_ci#endif
29570af302Sopenharmony_ci}
30

Indexes created Thu Nov 07 10:32:03 CST 2024