summaryrefslogtreecommitdiffstats
path: root/libc/stdio/fgetpos.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-12-02 01:50:58 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-12-02 01:50:58 +0000
commit6fd3ac79613c9e1832513b0f614860be2735993f (patch)
tree5f6bfb750aed249d5951d84de663c03f9e4b82dd /libc/stdio/fgetpos.c
parent9acef89e60381a298801e4b221d66b1538072b28 (diff)
downloaduClibc-alpine-6fd3ac79613c9e1832513b0f614860be2735993f.tar.bz2
uClibc-alpine-6fd3ac79613c9e1832513b0f614860be2735993f.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/stdio/fgetpos.c')
-rw-r--r--libc/stdio/fgetpos.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/stdio/fgetpos.c b/libc/stdio/fgetpos.c
index 84cf0b98c..03c18ab93 100644
--- a/libc/stdio/fgetpos.c
+++ b/libc/stdio/fgetpos.c
@@ -7,6 +7,10 @@
#include "_stdio.h"
+#ifndef __DO_LARGEFILE
+#define FTELL __ftell
+#endif
+
int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos)
{
#ifdef __STDIO_MBSTATE
@@ -16,7 +20,7 @@ int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos)
__STDIO_AUTO_THREADLOCK(stream);
- if ((pos->__pos = ftell(stream)) >= 0) {
+ if ((pos->__pos = FTELL(stream)) >= 0) {
__COPY_MBSTATE(&(pos->__mbstate), &(stream->__state));
pos->__mblen_pending = stream->__ungot_width[0];
retval = 0;
@@ -28,7 +32,7 @@ int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos)
#else
- return ((pos->__pos = ftell(stream)) >= 0) ? 0 : -1;
+ return ((pos->__pos = FTELL(stream)) >= 0) ? 0 : -1;
#endif
}