4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/types.h>
36 * Exported interfaces for standalone's subset of libc's <stdio.h>.
37 * All standalone code *must* use this header rather than libc's.
53 * Flags to setvbuf() which we pretend to support. We're always really _IONBF.
55 #define _IOFBF 0000 /* full buffered */
56 #define _IOLBF 0100 /* line buffered */
57 #define _IONBF 0004 /* not buffered */
60 unsigned char _flag
; /* state of the stream */
61 int _file
; /* file descriptor */
62 ssize_t _len
; /* total len of file */
63 ssize_t _offset
; /* offset within the file */
64 char _name
[256]; /* name of the file (for debugging) */
67 #define stdin (&__iob[0])
68 #define stdout (&__iob[1])
69 #define stderr (&__iob[2])
72 extern FILE __iob
[_NFILE
];
74 extern int fclose(FILE *);
75 extern int feof(FILE *);
76 extern int fflush(FILE *);
77 extern int ferror(FILE *);
78 extern void clearerr(FILE *);
80 extern char *fgets(char *, int, FILE *);
81 extern FILE *fopen(const char *, const char *);
82 extern size_t fread(void *, size_t, size_t, FILE *);
83 extern int fseek(FILE *, long, int);
84 extern long ftell(FILE *);
85 extern size_t fwrite(const void *, size_t, size_t, FILE *);
86 extern int setvbuf(FILE *, char *, int, size_t);
89 extern void printf(const char *, ...);
91 extern int fprintf(FILE *, const char *, ...);
93 extern int sprintf(char *, const char *, ...);
95 extern size_t snprintf(char *, size_t, const char *, ...);
96 extern int vsprintf(char *, const char *, va_list);
97 extern size_t vsnprintf(char *, size_t, const char *, va_list);
103 #endif /* _SA_STDIO_H */