Bug 8443 - <setjmp.h> missing prototypes with -DPOSIX_C_SOURCE=199506
Summary: <setjmp.h> missing prototypes with -DPOSIX_C_SOURCE=199506
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-13 14:54 UTC by Jay Turner
Modified: 2016-11-24 12:26 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2000-01-14 20:33:53 UTC


Attachments (Terms of Use)

Description Glen Foster 2000-01-13 14:54:21 UTC
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()

Comment 1 Cristian Gafton 2000-01-14 20:33:59 UTC
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)


Note You need to log in before you can comment on or make changes to this bug.