From bd0ff62e4a6f434708d6fb3b1258dc5226a40595 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Thu, 15 Feb 2001 16:14:39 +0000 Subject: Fix stdin/stdout/stderr (that I broke) and add vdprintf prototype. --- include/stdio.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/include/stdio.h b/include/stdio.h index 945e353a9..5e3982416 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -106,11 +106,14 @@ typedef struct __stdio_file FILE; #undef __need_FOPEN_MAX /* Standard streams (internal). */ -extern FILE _stdio_streams[3]; +extern FILE *_stdin; +extern FILE *_stdout; +extern FILE *_stderr; + /* C89/C99 say they're macros. Make them happy. */ -#define stdin (_stdio_streams) -#define stdout (_stdio_streams+1) -#define stderr (_stdio_streams+2) +#define stdin _stdin +#define stdout _stdout +#define stderr _stderr /* Remove file FILENAME. */ extern int remove __P ((__const char *__filename)); @@ -210,6 +213,10 @@ extern int printf __P ((__const char *__restrict __format, ...)); extern int sprintf __P ((char *__restrict __s, __const char *__restrict __format, ...)); +/* Write formatted output to a file descriptor */ +extern int vdprintf __P((int fd, __const char *__restrict __format, + va_list __arg)); + /* Write formatted output to a buffer S dynamically allocated by asprintf. */ extern int asprintf __P ((char **__restrict __s, __const char *__restrict __format, ...)); -- cgit v1.2.3