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

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-01-14 20:38:48 UTC


Attachments (Terms of Use)

Description Glen Foster 2000-01-13 15:14:08 UTC
VSX-PCTS finds a problem with <stdio.h> - similar to defect #8443.  The
test expects to see definitions for "stdin", "stdout", and "stderr" when
#including <stdio.h> and compiling with the following 2 option sets:

	(a) -DPOSIX_C_SOURCE=199506
	(b) -DPOSIX_C_SOURCE=199506 -DPOSIX_SOURCE

Appropriate lines from testing journal are as follows:
======================================================================
200|5 4 17:56:47|TP Start
520|5 4 00006063 4 1|Feature test macros: -D_POSIX_C_SOURCE=199506
520|5 4 00006063 4 2|Compiler or run-time messages or results:
520|5 4 00006063 4 3|Undefined identifier: stdin
520|5 4 00006063 4 4|Undefined identifier: stdout
520|5 4 00006063 4 5|Undefined identifier: stderr
520|5 4 00006063 7 1|Feature test macros: -D_POSIX_C_SOURCE=199506
-D_POSIX_SOURCE
520|5 4 00006063 7 2|Compiler or run-time messages or results:
520|5 4 00006063 7 3|Undefined identifier: stdin
520|5 4 00006063 7 4|Undefined identifier: stdout
520|5 4 00006063 7 5|Undefined identifier: stderr

Comment 1 Cristian Gafton 2000-01-14 20:38:59 UTC
probably teh test suite expects to see themm defined as constants, but there is
no standard requiring that.

Anyway, this works ofr me also:

alien (gafton):~/src/glibc/proto>cat proto.c
#define POSIX_C_SOURCE 199506
#include <stdio.h>

alien (gafton):~/src/glibc/proto>gcc -E proto.c -c | \
	grep "stdin\|stderr\|stdout"
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;


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