This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
stdio, stderr, stdout
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: stdio, stderr, stdout
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Tue, 11 Jan 2000 13:39:57 -0800 (PST)
According to ANSI C and Unix98, the <stdio.h> header must define macros
named stdio, stderr and stdout which are expressions of type FILE *.
This is obviously stated in Unix98, but not so obviously stated in ANSI C.
(ANSI/ISO C 1990 has a long paragraph split across the page which
introduces all of the macros, and the streams appear toward the end.
It's fine to define the file scope object names
extern FILE *stdout;
and so forth, but these should be followed by
#define stdout stdout
and so forth. I know it's a silly detail, but if compliance is that easy
to achieve, why not?