diff options
Diffstat (limited to 'newlib/libc/stdio64/fsetpos64.c')
-rw-r--r-- | newlib/libc/stdio64/fsetpos64.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/newlib/libc/stdio64/fsetpos64.c b/newlib/libc/stdio64/fsetpos64.c index f0ec64ebf..046990d7a 100644 --- a/newlib/libc/stdio64/fsetpos64.c +++ b/newlib/libc/stdio64/fsetpos64.c @@ -4,10 +4,14 @@ FUNCTION INDEX fsetpos64 +INDEX + _fsetpos64_r ANSI_SYNOPSIS #include <stdio.h> int fsetpos64(FILE *<[fp]>, const _fpos64_t *<[pos]>); + int _fsetpos64_r(struct _reent *<[ptr]>, FILE *<[fp]>, + const _fpos64_t *<[pos]>); TRAD_SYNOPSIS #include <stdio.h> @@ -15,6 +19,11 @@ TRAD_SYNOPSIS FILE *<[fp]>; _fpos64_t *<[pos]>; + int _fsetpos64_r(<[ptr]>, <[fp]>, <[pos]>) + struct _reent *<[ptr]>; + FILE *<[fp]>; + _fpos64_t *<[pos]>; + 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 @@ -43,15 +52,28 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #ifdef __LARGE64_FILES int -_DEFUN (fsetpos64, (iop, pos), +_DEFUN (_fsetpos64_r, (ptr, iop, pos), + struct _reent *ptr _AND FILE * iop _AND _CONST _fpos64_t * pos) { - int x = fseeko64 (iop, (_off64_t)(*pos), SEEK_SET); + int x = _fseeko64_r (ptr, iop, (_off64_t)(*pos), SEEK_SET); if (x != 0) return 1; return 0; } +#ifndef _REENT_ONLY + +int +_DEFUN (fsetpos64, (iop, pos), + FILE * iop _AND + _CONST _fpos64_t * pos) +{ + return _fsetpos64_r (_REENT, iop, pos); +} + +#endif /* !_REENT_ONLY */ + #endif /* __LARGE64_FILES */ |