summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-12-21 16:13:38 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-12-21 16:13:38 (GMT)
commitf084b653835940c749d4fc92a610e861a6644aa2 (patch)
tree2531dd1bf3c93790dafe610dc87bcba0ffd61c8a /programs
parent973bc79740f571c2b6700cab16a319df9aed2a05 (diff)
downloadlz4-f084b653835940c749d4fc92a610e861a6644aa2.zip
lz4-f084b653835940c749d4fc92a610e861a6644aa2.tar.gz
lz4-f084b653835940c749d4fc92a610e861a6644aa2.tar.bz2
test Large File support for Mac OS-X in 32-bits mode
Diffstat (limited to 'programs')
-rw-r--r--programs/bench.c8
-rw-r--r--programs/lz4io.c13
2 files changed, 19 insertions, 2 deletions
diff --git a/programs/bench.c b/programs/bench.c
index f077b42..01e610c 100644
--- a/programs/bench.c
+++ b/programs/bench.c
@@ -24,6 +24,14 @@
*/
+/*-************************************
+* Compiler options
+**************************************/
+#ifdef _MSC_VER /* Visual Studio */
+# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
+#endif
+
+
/* *************************************
* Includes
***************************************/
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 36498b2..3d69a6e 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -31,10 +31,17 @@
*/
+/*-************************************
+* Compiler options
+**************************************/
+#ifdef _MSC_VER /* Visual Studio */
+# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
+#endif
#if defined(__MINGW32__) && !defined(_POSIX_SOURCE)
# define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */
#endif
+
/*****************************
* Includes
*****************************/
@@ -644,8 +651,10 @@ static unsigned LZ4IO_fwriteSparse(FILE* file, const void* buffer, size_t buffer
storedSkips += (unsigned)(nb0T * sizeT);
if (nb0T != seg0SizeT) { /* not all 0s */
- int const seekResult = fseek(file, storedSkips, SEEK_CUR);
- if (seekResult) EXM_THROW(72, "Sparse skip error ; try --no-sparse");
+ errno = 0;
+ { int const seekResult = fseek(file, storedSkips, SEEK_CUR);
+ if (seekResult) EXM_THROW(72, "Sparse skip error(%d): %s ; try --no-sparse", (int)errno, strerror(errno));
+ }
storedSkips = 0;
seg0SizeT -= nb0T;
ptrT += nb0T;