summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-03-31 13:47:23 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-03-31 13:47:23 (GMT)
commit3bba55c741293dd8162e5afb9eace5e03fcff023 (patch)
tree94b181c5a6d2357cf01cdc01d01af8bc6c618d25
parent7c26b038547e3a488a6cd5fe13df260b6e4d6e08 (diff)
downloadlz4-3bba55c741293dd8162e5afb9eace5e03fcff023.zip
lz4-3bba55c741293dd8162e5afb9eace5e03fcff023.tar.gz
lz4-3bba55c741293dd8162e5afb9eace5e03fcff023.tar.bz2
Fixed : Windows compilation
Added : Appveyor badge
-rw-r--r--[-rwxr-xr-x]README.md4
-rw-r--r--lib/lz4frame.c6
-rw-r--r--[-rwxr-xr-x]lz4_Frame_format.md0
-rw-r--r--programs/frametest.c2
-rw-r--r--programs/lz4io.c4
5 files changed, 12 insertions, 4 deletions
diff --git a/README.md b/README.md
index 69f7397..453bb01 100755..100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,8 @@ It trades CPU time for compression ratio.
|------------|---------|
|master | [![Build Status](https://travis-ci.org/Cyan4973/lz4.svg?branch=master)](https://travis-ci.org/Cyan4973/lz4) |
|dev | [![Build Status](https://travis-ci.org/Cyan4973/lz4.svg?branch=dev)](https://travis-ci.org/Cyan4973/lz4) |
+|visual | [![Build status](https://ci.appveyor.com/api/projects/status/v6kxv9si529477cq?svg=true)](https://ci.appveyor.com/project/YannCollet/lz4) |
+
> **Branch Policy:**
@@ -63,4 +65,4 @@ defined into [lz4_Frame_format].
[Open-Source Benchmark program by m^2 (v0.14.3)]: http://encode.ru/threads/1371-Filesystem-benchmark?p=34029&viewfull=1#post34029
[Silesia Corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
[lz4_Block_format]: lz4_Block_format.md
-[lz4_Frame_format]: lz4_Frame_format.md \ No newline at end of file
+[lz4_Frame_format]: lz4_Frame_format.md
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index 5f69c95..474b196 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -1088,8 +1088,10 @@ size_t LZ4F_decompress(LZ4F_decompressionContext_t decompressionContext,
doAnotherStage = 0; /* not enough src data, ask for some more */
break;
}
- LZ4F_errorCode_t errorCode = LZ4F_decodeHeader(dctxPtr, dctxPtr->header, dctxPtr->tmpInTarget);
- if (LZ4F_isError(errorCode)) return errorCode;
+ {
+ LZ4F_errorCode_t errorCode = LZ4F_decodeHeader(dctxPtr, dctxPtr->header, dctxPtr->tmpInTarget);
+ if (LZ4F_isError(errorCode)) return errorCode;
+ }
break;
}
diff --git a/lz4_Frame_format.md b/lz4_Frame_format.md
index 55edaa0..55edaa0 100755..100644
--- a/lz4_Frame_format.md
+++ b/lz4_Frame_format.md
diff --git a/programs/frametest.c b/programs/frametest.c
index 96d5acb..4beee23 100644
--- a/programs/frametest.c
+++ b/programs/frametest.c
@@ -607,7 +607,7 @@ int fuzzerTests(U32 seed, unsigned nbTests, unsigned startTest, double compressi
/* create a skippable frame (rare case) */
BYTE* op = (BYTE*)compressedBuffer;
FUZ_writeLE32(op, LZ4F_MAGIC_SKIPPABLE_START + (FUZ_rand(&randState) & 15));
- FUZ_writeLE32(op+4, srcSize);
+ FUZ_writeLE32(op+4, (U32)srcSize);
cSize = srcSize+8;
}
else if ((FUZ_rand(&randState) & 0xF) == 2)
diff --git a/programs/lz4io.c b/programs/lz4io.c
index 34d24bf..02e03c8 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -75,6 +75,10 @@
# define SET_SPARSE_FILE_MODE(file)
#endif
+#if !defined(S_ISREG)
+# define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
+#endif
+
/*****************************
* Constants