summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/mingwex/stdio/ftello64.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/stdio/ftello64.c')
-rwxr-xr-xwinsup/mingw/mingwex/stdio/ftello64.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/stdio/ftello64.c b/winsup/mingw/mingwex/stdio/ftello64.c
new file mode 100755
index 000000000..97a388cd6
--- /dev/null
+++ b/winsup/mingw/mingwex/stdio/ftello64.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+off64_t __cdecl
+ftello64 (FILE * stream)
+{
+ fpos_t pos;
+ if (fgetpos(stream, &pos))
+ return -1LL;
+ else
+ return ((off64_t) pos);
+}