summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/include/stdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/include/stdio.h')
-rw-r--r--winsup/mingw/include/stdio.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h
index 63ff1d6ca..9b53fbfb1 100644
--- a/winsup/mingw/include/stdio.h
+++ b/winsup/mingw/include/stdio.h
@@ -392,6 +392,30 @@ _CRTIMP int __cdecl fileno (FILE*);
#define fileno(__F) ((__F)->_file)
#endif
+#if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
+#include <sys/types.h>
+__CRT_INLINE FILE* __cdecl fopen64 (const char* filename, const char* mode)
+{
+ return fopen (filename, mode);
+}
+
+int __cdecl fseeko64 (FILE*, off64_t, int);
+
+#ifdef __USE_MINGW_FSEEK
+int __cdecl __mingw_fseeko64 (FILE *, off64_t, int);
+#define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence)
+#endif
+
+__CRT_INLINE off64_t __cdecl ftello64 (FILE * stream)
+{
+ fpos_t pos;
+ if (fgetpos(stream, &pos))
+ return -1LL;
+ else
+ return ((off64_t) pos);
+}
+#endif /* __NO_MINGW_LFS */
+
#endif /* Not __STRICT_ANSI__ */
/* Wide versions */