Bug 8444 - <stdio.h> missing prototypes with -DPOSIX_C_SOURCE=199506
<stdio.h> missing prototypes with -DPOSIX_C_SOURCE=199506
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
4.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-13 10:14 EST by Jay Turner
Modified: 2016-11-24 07:25 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-14 15:38:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Glen Foster 2000-01-13 10:14:08 EST
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 15:38:59 EST
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.