summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-03-01 23:41:38 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-03-01 23:41:38 (GMT)
commit67f3b4141af0a33e9590e4678f06724076b7b69e (patch)
tree8e357ae77a2a61cceaaa38844ea17f79265e2967
parente68d1c98c1b4f036f3345ca56d8649b34305e9cb (diff)
parent41b6ed3c5bc7f0c85f1bfe3abc940d9b74581e7d (diff)
downloadlz4-67f3b4141af0a33e9590e4678f06724076b7b69e.zip
lz4-67f3b4141af0a33e9590e4678f06724076b7b69e.tar.gz
lz4-67f3b4141af0a33e9590e4678f06724076b7b69e.tar.bz2
Merge pull request #49 from t-mat/msvc-fseeki64
Avoid MSVC fseek()'s 2GiB barrier
-rw-r--r--programs/lz4io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c
index fa1f0f9..023824e 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -71,6 +71,9 @@
# ifdef __MINGW32__
int _fileno(FILE *stream); /* MINGW somehow forgets to include this windows declaration into <stdio.h> */
# endif
+# if defined(_MSC_VER) && (_MSC_VER >= 1400) /* Avoid MSVC fseek()'s 2GiB barrier */
+# define fseek _fseeki64
+# endif
# define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY)
# define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
#else