diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
commit | 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 (patch) | |
tree | 7c0c62debf8f9f145643102fb52b81afce743594 /mdk-stage1/dietlibc/dietstdio.h | |
parent | 9097327dc1c667fc51b8e05cc7c0626fac96665d (diff) | |
download | drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.gz drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.bz2 drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.xz drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.zip |
import new version of dietlibc
Diffstat (limited to 'mdk-stage1/dietlibc/dietstdio.h')
-rw-r--r-- | mdk-stage1/dietlibc/dietstdio.h | 25 |
1 files changed, 21 insertions, 4 deletions
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 <sys/types.h> +#ifdef WANT_THREAD_SAVE +#include <pthread.h> +#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); |