diff options
Diffstat (limited to 'newlib/libc/stdio64/ftello64.c')
-rw-r--r-- | newlib/libc/stdio64/ftello64.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/newlib/libc/stdio64/ftello64.c b/newlib/libc/stdio64/ftello64.c index 1ca5b0452..aaf0f023e 100644 --- a/newlib/libc/stdio64/ftello64.c +++ b/newlib/libc/stdio64/ftello64.c @@ -21,16 +21,23 @@ FUNCTION INDEX ftello64 +INDEX + _ftello64_r ANSI_SYNOPSIS #include <stdio.h> _off64_t ftello64(FILE *<[fp]>); + _off64_t _ftello64_r(struct _reent *<[ptr]>, FILE *<[fp]>); TRAD_SYNOPSIS #include <stdio.h> _off64_t ftello64(<[fp]>) FILE *<[fp]>; + _off64_t _ftello64_r(<[ptr]>, <[fp]>) + struct _reent *<[ptr]>; + FILE *<[fp]>; + DESCRIPTION Objects of type <<FILE>> can have a ``position'' that records how much of the file your program has already read. Many of the <<stdio>> functions @@ -78,7 +85,8 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #ifdef __LARGE64_FILES _off64_t -_DEFUN (ftello64, (fp), +_DEFUN (_ftello64_r, (ptr, fp), + struct _reent *ptr _AND register FILE * fp) { _fpos64_t pos; @@ -91,7 +99,7 @@ _DEFUN (ftello64, (fp), if (fp->_seek64 == NULL) { - fp->_data->_errno = ESPIPE; + ptr->_errno = ESPIPE; _funlockfile(fp); return -1L; } @@ -135,4 +143,15 @@ _DEFUN (ftello64, (fp), return pos; } +#ifndef _REENT_ONLY + +_off64_t +_DEFUN (ftello64, (fp), + register FILE * fp) +{ + return _ftello64_r (_REENT, fp); +} + +#endif /* !_REENT_ONLY */ + #endif /* __LARGE64_FILES */ |