diff options
Diffstat (limited to 'src/stdio')
| -rw-r--r-- | src/stdio/__FILES.c | 2 | ||||
| -rw-r--r-- | src/stdio/__stdio.c | 2 | ||||
| -rw-r--r-- | src/stdio/_stdio.h | 9 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/stdio/__FILES.c b/src/stdio/__FILES.c deleted file mode 100644 index f9bcdbba..00000000 --- a/src/stdio/__FILES.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "_stdio.h" -struct __FILE __FILES[FOPEN_MAX]; diff --git a/src/stdio/__stdio.c b/src/stdio/__stdio.c new file mode 100644 index 00000000..d607bde6 --- /dev/null +++ b/src/stdio/__stdio.c @@ -0,0 +1,2 @@ +#include "_stdio.h" +struct __stdio __stdio; diff --git a/src/stdio/_stdio.h b/src/stdio/_stdio.h index 6cb0ab0c..79e7a28c 100644 --- a/src/stdio/_stdio.h +++ b/src/stdio/_stdio.h @@ -14,7 +14,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,7 +55,11 @@ 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); -extern struct __FILE __FILES[FOPEN_MAX]; +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) |
