summaryrefslogtreecommitdiff
path: root/src/win32/mingw-compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32/mingw-compat.h')
-rw-r--r--src/win32/mingw-compat.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/win32/mingw-compat.h b/src/win32/mingw-compat.h
index 059e39cbc..83ee28765 100644
--- a/src/win32/mingw-compat.h
+++ b/src/win32/mingw-compat.h
@@ -9,18 +9,11 @@
#if defined(__MINGW32__)
-/* use a 64-bit file offset type */
-# undef lseek
-# define lseek _lseeki64
-# undef stat
-# define stat _stati64
-# undef fstat
-# define fstat _fstati64
-
-/* stat: file mode type testing macros */
-# define _S_IFLNK 0120000
-# define S_IFLNK _S_IFLNK
-# define S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK)
+#if _WIN32_WINNT >= 0x0601
+#define stat __stat64
+#else
+#define stat _stati64
+#endif
#endif