stdio, stderr, stdout

Kaz Kylheku kaz@ashi.footprints.net
Tue Jan 11 13:40:00 GMT 2000


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?




More information about the Libc-alpha mailing list