From 3bba55c741293dd8162e5afb9eace5e03fcff023 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 31 Mar 2015 14:47:23 +0100 Subject: Fixed : Windows compilation Added : Appveyor badge --- README.md | 4 +++- lib/lz4frame.c | 6 ++++-- lz4_Frame_format.md | 0 programs/frametest.c | 2 +- programs/lz4io.c | 4 ++++ 5 files changed, 12 insertions(+), 4 deletions(-) mode change 100755 => 100644 README.md mode change 100755 => 100644 lz4_Frame_format.md diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 69f7397..453bb01 --- 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 old mode 100755 new mode 100644 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 -- cgit v0.12