From e4d7651f0267f4ba5c59553d6f12b759d1a6c514 Mon Sep 17 00:00:00 2001 From: eck Date: Tue, 13 Feb 1990 17:08:05 +0000 Subject: [PATCH] fixed fflush: it didn't even compile! --- lang/cem/libcc.ansi/stdio/fflush.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lang/cem/libcc.ansi/stdio/fflush.c b/lang/cem/libcc.ansi/stdio/fflush.c index b738c8ef9..24f1a3810 100644 --- a/lang/cem/libcc.ansi/stdio/fflush.c +++ b/lang/cem/libcc.ansi/stdio/fflush.c @@ -3,10 +3,12 @@ */ /* $Header$ */ +#include #include #include "loc_incl.h" int _write(int d, const char *buf, int nbytes); +off_t _lseek(int fildes, off_t offset, int whence); int fflush(FILE *stream) @@ -21,8 +23,8 @@ fflush(FILE *stream) } if (!stream->_buf - || (!io_testflag(_IOREADING) - && !io_testflag(_IOWRITING))) + || (!io_testflag(stream, _IOREADING) + && !io_testflag(stream, _IOWRITING))) return 0; if (io_testflag(stream, _IOREADING)) { (void) fseek(stream, 0L, SEEK_CUR); @@ -39,7 +41,7 @@ fflush(FILE *stream) return 0; if (io_testflag(stream, _IOAPPEND)) { - if (lseek(fileno(stream), 0L, SEEK_END) == -1) { + if (_lseek(fileno(stream), 0L, SEEK_END) == -1) { stream->_flags |= _IOERR; return EOF; } -- 2.34.1