From 2fd7eb554a17ce4815c60b29a226130e0ea448d6 Mon Sep 17 00:00:00 2001 From: Przemyslaw Skibinski Date: Wed, 21 Dec 2016 11:53:16 +0100 Subject: fixed Visual Studio compilation --- programs/lz4io.c | 8 ++++++++ programs/platform.h | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/programs/lz4io.c b/programs/lz4io.c index df3ed41..ca3cea5 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -47,12 +47,20 @@ #include "lz4hc.h" /* still required for legacy format */ #include "lz4frame.h" +/* ************************************** +* Compiler Options +****************************************/ +#if defined(_MSC_VER) && (_MSC_VER >= 1400) /* Avoid MSVC fseek()'s 2GiB barrier */ +# define fseek _fseeki64 +#endif + #if 0 #if !defined(__64BIT__) && (PLATFORM_POSIX_VERSION >= 200112L) /* No point defining Large file for 64 bit */ # define fseek fseeko #endif #endif + /***************************** * Constants *****************************/ diff --git a/programs/platform.h b/programs/platform.h index 02ebd4c..fe4bfde 100644 --- a/programs/platform.h +++ b/programs/platform.h @@ -38,9 +38,6 @@ extern "C" { # if (_MSC_VER <= 1800) /* (1800 = Visual Studio 2013) */ # define snprintf sprintf_s /* snprintf unsupported by Visual <= 2013 */ # endif -# if (_MSC_VER >= 1400) /* Avoid MSVC fseek()'s 2GiB barrier */ -# define fseek _fseeki64 -# endif #endif #if defined(__MINGW32__) && !defined(_POSIX_SOURCE) # define _POSIX_C_SOURCE 1 /* enable __VA_ARGS__ and disable %llu warnings with MinGW on Windows */ -- cgit v0.12