Hide Forgot
According to the OpenGroup VSX-PCTS suite, <setjmp.h> should have function prototypes for longjmp() and siglongjmp() in the compilation namespace when #including the file and using the following sets of compiler flags: (a) -DPOSIX_C_SOURCE=199506 (b) -DPOSIX_C_SOURCE=199506 -DPOSIX_SOURCE Appropriate excerpts from the test journal are as follows: ===================================================================== 200|4 3 17:56:44|TP Start 520|4 3 00005885 4 1|Feature test macros: -D_POSIX_C_SOURCE=199506 520|4 3 00005885 4 2|Compiler or run-time messages or results: 520|4 3 00005885 4 3|missing prototype for longjmp() 520|4 3 00005885 7 1|Feature test macros: -D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE 520|4 3 00005885 7 2|Compiler or run-time messages or results: 520|4 3 00005885 7 3|missing prototype for longjmp() 220|4 3 1 17:56:44|FAIL 200|4 4 17:56:44|TP Start 520|4 4 00005885 4 1|Feature test macros: -D_POSIX_C_SOURCE=199506 520|4 4 00005885 4 2|Compiler or run-time messages or results: 520|4 4 00005885 4 3|missing prototype for siglongjmp() 520|4 4 00005885 7 1|Feature test macros: -D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE 520|4 4 00005885 7 2|Compiler or run-time messages or results: 520|4 4 00005885 7 3|missing prototype for siglongjmp()
This again works for me: alien (gafton):~/src/glibc/proto>cat proto.c #define POSIX_C_SOURCE 199506 #include <setjmp.h> alien (gafton):~/src/glibc/proto>gcc -E proto.c -c | grep "longjmp" extern void longjmp (jmp_buf __env, int __val) extern void _longjmp (jmp_buf __env, int __val) extern void siglongjmp (sigjmp_buf __env, int __val)