fixed Visual Studio compilation

This commit is contained in:
Przemyslaw Skibinski 2016-12-21 11:53:16 +01:00
parent 3c6ce9c665
commit 2fd7eb554a
2 changed files with 8 additions and 3 deletions

View File

@ -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
*****************************/

View File

@ -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 */