projects
/
libc-test
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add an sscanf regression test
[libc-test]
/
src
/
api
/
setjmp.c
diff --git
a/src/api/setjmp.c
b/src/api/setjmp.c
index
84fde10
..
2333aa1
100644
(file)
--- a/
src/api/setjmp.c
+++ b/
src/api/setjmp.c
@@
-4,10
+4,26
@@
static void f()
{
T(jmp_buf)
{void(*p)(jmp_buf,int) = longjmp;}
{
T(jmp_buf)
{void(*p)(jmp_buf,int) = longjmp;}
+#ifdef setjmp
+{int x = setjmp((jmp_buf){0});}
+#else
{int(*p)(jmp_buf) = setjmp;}
{int(*p)(jmp_buf) = setjmp;}
+#endif
#ifdef _POSIX_C_SOURCE
T(sigjmp_buf)
{void(*p)(sigjmp_buf,int) = siglongjmp;}
#ifdef _POSIX_C_SOURCE
T(sigjmp_buf)
{void(*p)(sigjmp_buf,int) = siglongjmp;}
+#ifdef sigsetjmp
+{int x = sigsetjmp((sigjmp_buf){0}, 0);}
+#else
{int(*p)(sigjmp_buf,int) = sigsetjmp;}
#endif
{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
}
}