Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio64/fgetpos64.c')
-rw-r--r--newlib/libc/stdio64/fgetpos64.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/newlib/libc/stdio64/fgetpos64.c b/newlib/libc/stdio64/fgetpos64.c
index 3a0f0d910..5f8c1c3ab 100644
--- a/newlib/libc/stdio64/fgetpos64.c
+++ b/newlib/libc/stdio64/fgetpos64.c
@@ -4,10 +4,14 @@ FUNCTION
INDEX
fgetpos64
+INDEX
+ _fgetpos64_r
ANSI_SYNOPSIS
#include <stdio.h>
int fgetpos64(FILE *<[fp]>, _fpos64_t *<[pos]>);
+ int _fgetpos64_r(struct _reent *<[ptr]>, FILE *<[fp]>,
+ _fpos64_t *<[pos]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -15,6 +19,10 @@ TRAD_SYNOPSIS
FILE *<[fp]>;
_fpos64_t *<[pos]>;
+ int _fgetpos64_r(<[ptr]>, <[fp]>, <[pos]>)
+ 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
@@ -47,12 +55,13 @@ No supporting OS subroutines are required.
#ifdef __LARGE64_FILES
int
-_DEFUN (fgetpos64, (fp, pos),
+_DEFUN (_fgetpos64_r, (ptr, fp, pos),
+ struct _reent * ptr _AND
FILE * fp _AND
_fpos64_t * pos)
{
_flockfile(fp);
- *pos = (_fpos64_t)ftello64 (fp);
+ *pos = (_fpos64_t)_ftello64_r (ptr, fp);
if (*pos != -1)
{
@@ -63,4 +72,16 @@ _DEFUN (fgetpos64, (fp, pos),
return 1;
}
+#ifndef _REENT_ONLY
+
+int
+_DEFUN (fgetpos64, (fp, pos),
+ FILE * fp _AND
+ _fpos64_t * pos)
+{
+ return _fgetpos64_r (_REENT, fp, pos);
+}
+
+#endif /* !_REENT_ONLY */
+
#endif /* __LARGE64_FILES */