summaryrefslogtreecommitdiff
path: root/src/stdio/_stdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/_stdio.h')
-rw-r--r--src/stdio/_stdio.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/stdio/_stdio.h b/src/stdio/_stdio.h
index 84ad60ca..dac25c13 100644
--- a/src/stdio/_stdio.h
+++ b/src/stdio/_stdio.h
@@ -3,7 +3,6 @@
#include <stdarg.h>
#include <stdio.h>
-#include "nonstd/internal.h"
#ifdef _POSIX_C_SOURCE
#include <sys/types.h>
@@ -14,7 +13,8 @@
struct __FILE {
fpos_t pos;
char *buf;
- enum { SUPPLIED, ALLOCED, UNSET } buftype;
+ char ibuf[BUFSIZ];
+ enum { INTERNAL, SUPPLIED, ALLOCED, UNSET } buftype;
int buffering;
int bsize;
int isopen;
@@ -54,6 +54,12 @@ struct io_options {
int __printf(struct io_options * restrict, const char * restrict, va_list);
int __scanf(struct io_options * restrict, const char * restrict, va_list);
+struct __stdio {
+ struct __FILE FILES[FOPEN_MAX];
+};
+
+extern struct __stdio __stdio;
+
#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 199506L
#define flockfile(_file) (void)(_file)
#define funlockfile(_file) (void)(_file)