From bf336572bfaf93687d8960f55b44f52b4784907b Mon Sep 17 00:00:00 2001 From: Przemyslaw Skibinski Date: Tue, 14 Feb 2017 09:45:33 +0100 Subject: [PATCH] Avoid fseek()'s 2GiB barrier with MacOS and *BSD --- programs/fileio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/programs/fileio.c b/programs/fileio.c index b8d4ef02d..c152fdcbe 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -91,8 +91,13 @@ static clock_t g_time = 0; #define MIN(a,b) ((a) < (b) ? (a) : (b)) +/* ************************************************************ +* Avoid fseek()'s 2GiB barrier with MSVC, MacOS, *BSD, MinGW +***************************************************************/ #if defined(_MSC_VER) && _MSC_VER >= 1400 # define LONG_SEEK _fseeki64 +#elif !defined(__64BIT__) && (PLATFORM_POSIX_VERSION >= 200112L) /* No point defining Large file for 64 bit */ +# define fseek fseeko #elif defined(__MINGW32__) && !defined(__STRICT_ANSI__) && !defined(__NO_MINGW_LFS) && defined(__MSVCRT__) # define LONG_SEEK fseeko64 #elif defined(_WIN32) && !defined(__DJGPP__)