From 02fec4701cee79f875c1d02b8b4aee09380dbcb8 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 4 Jan 2001 20:04:45 +0000 Subject: integrate dietlibc/stdio per default for cdrom and disk only installs --- mdk-stage1/dietlibc/dietstdio.h | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 mdk-stage1/dietlibc/dietstdio.h (limited to 'mdk-stage1/dietlibc/dietstdio.h') diff --git a/mdk-stage1/dietlibc/dietstdio.h b/mdk-stage1/dietlibc/dietstdio.h new file mode 100644 index 000000000..5cacbde23 --- /dev/null +++ b/mdk-stage1/dietlibc/dietstdio.h @@ -0,0 +1,64 @@ +/* diet stdio -- no buffering ;-} */ + +#include "dietfeatures.h" +#include + +#define BUFSIZE 128 + +typedef struct __file { + int fd; + int flags; +#ifdef WANT_BUFFERED_STDIO + int seekofs; + int bm; + char buf[BUFSIZE]; + struct __file *next; +#endif +} FILE; + +extern FILE *__stdio_root; + +#define ERRORINDICATOR 1 +#define EOFINDICATOR 2 +#define BUFINPUT 4 +#define BUFLINEWISE 8 + +/* internal function to flush buffer. + * However, if next is BUFINPUT and the buffer is an input buffer, it + * will not be flushed. Vice versa for output */ +extern int __fflush4(FILE *stream,int next); + +FILE *fopen (const char *path, const char *mode); +FILE *fdopen (int fildes, const char *mode); +FILE *freopen (const char *path, const char *mode, FILE *stream); + +int fgetc(FILE *stream); +char *fgets(char *s, int size, FILE *stream); +int getc(FILE *stream); +int getchar(void); +char *gets(char *s); +int ungetc(int c, FILE *stream); + +int fputc(int c, FILE *stream); +int fputs(const char *s, FILE *stream); +int putc(int c, FILE *stream); +int putchar(int c); +int puts(const char *s); + +int fseek( FILE *stream, long offset, int whence); +long ftell( FILE *stream); +void rewind( FILE *stream); +int fgetpos( FILE *stream, fpos_t *pos); +int fsetpos( FILE *stream, fpos_t *pos); + +size_t fread( void *ptr, size_t size, size_t nmemb, FILE *stream); + +size_t fwrite( const void *ptr, size_t size, size_t nmemb, FILE *stream); + +int fflush(FILE *stream); + +int fclose(FILE *stream); + +extern FILE *stdout, *stderr, *stdin; + +#define EOF (int)(-1) -- cgit v1.2.1