From 2a940c1a22765411b70679bf886714930aeaf79f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 14 Mar 2003 18:39:05 +0000 Subject: * libc/include/stdio.h: Declare fgetpos, fsetpos, fseeko and ftello with internal (_fpos_t and _off_t) datatypes when compiling newlib. * libc/include/sys/unistd.h: Declare _lseek using _off_t. * libc/reent/lseekr.c (_lseek_r): Use _off_t instead of off_t. * libc/stdio/fseeko.c (fseeko): Ditto. * libc/stdio/ftello.c (ftello): Ditto. * libc/stdio/stdio.c (__swrite): Ditto. (__sseek): Ditto. * libc/stdio/fgetpos.c (fgetpos): Use _fpos_t instead of fpos_t. * libc/stdio/fseek.c (fseek): Ditto. * libc/stdio/fsetpos.c (fsetpos): Ditto. * libc/stdio/ftell.c (ftell): Ditto. * libc/stdio/local.h: Declare __sseek using _off_t. --- newlib/libc/stdio/stdio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'newlib/libc/stdio/stdio.c') diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c index b0c759fdb..478e95cdb 100644 --- a/newlib/libc/stdio/stdio.c +++ b/newlib/libc/stdio/stdio.c @@ -72,7 +72,7 @@ __swrite (cookie, buf, n) #endif if (fp->_flags & __SAPP) - (void) _lseek_r (fp->_data, fp->_file, (off_t) 0, SEEK_END); + (void) _lseek_r (fp->_data, fp->_file, (_off_t) 0, SEEK_END); fp->_flags &= ~__SOFF; /* in case O_APPEND mode is set */ #ifdef __SCLE @@ -90,16 +90,16 @@ __swrite (cookie, buf, n) return w; } -fpos_t +_fpos_t __sseek (cookie, offset, whence) _PTR cookie; - fpos_t offset; + _fpos_t offset; int whence; { register FILE *fp = (FILE *) cookie; - register off_t ret; + register _off_t ret; - ret = _lseek_r (fp->_data, fp->_file, (off_t) offset, whence); + ret = _lseek_r (fp->_data, fp->_file, (_off_t) offset, whence); if (ret == -1L) fp->_flags &= ~__SOFF; else -- cgit v1.2.3