From 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 14 May 2001 14:19:32 +0000 Subject: import new version of dietlibc --- mdk-stage1/dietlibc/dietstdio.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'mdk-stage1/dietlibc/dietstdio.h') diff --git a/mdk-stage1/dietlibc/dietstdio.h b/mdk-stage1/dietlibc/dietstdio.h index 5cacbde23..a1cbeba83 100644 --- a/mdk-stage1/dietlibc/dietstdio.h +++ b/mdk-stage1/dietlibc/dietstdio.h @@ -2,6 +2,9 @@ #include "dietfeatures.h" #include +#ifdef WANT_THREAD_SAVE +#include +#endif #define BUFSIZE 128 @@ -9,10 +12,18 @@ typedef struct __file { int fd; int flags; #ifdef WANT_BUFFERED_STDIO - int seekofs; - int bm; + unsigned int bs; /* read: bytes in buffer */ + unsigned int bm; /* position in buffer */ char buf[BUFSIZE]; - struct __file *next; + struct __file *next; /* for fflush */ +#endif + pid_t popen_kludge; +#ifdef WANT_UNGETC + char ungetbuf; + char ungotten; +#endif +#ifdef WANT_THREAD_SAVE + pthread_mutex_t m; #endif } FILE; @@ -22,6 +33,12 @@ extern FILE *__stdio_root; #define EOFINDICATOR 2 #define BUFINPUT 4 #define BUFLINEWISE 8 +#define NOBUF 16 +#define UNSEEKABLE 32 + +#define _IONBF 0 +#define _IOLBF 1 +#define _IOFBF 2 /* internal function to flush buffer. * However, if next is BUFINPUT and the buffer is an input buffer, it @@ -45,7 +62,7 @@ int putc(int c, FILE *stream); int putchar(int c); int puts(const char *s); -int fseek( FILE *stream, long offset, int whence); +long fseek( FILE *stream, long offset, int whence); long ftell( FILE *stream); void rewind( FILE *stream); int fgetpos( FILE *stream, fpos_t *pos); -- cgit v1.2.1