From c1864f69e87d68fe79420c9303ecf97eb66bc7c7 Mon Sep 17 00:00:00 2001 From: inikep Date: Fri, 2 Sep 2016 21:50:57 +0200 Subject: fix mingw64 compilation warnings --- .gitignore | 3 +++ programs/bench.c | 4 ++++ programs/lz4cli.c | 2 +- programs/lz4io.c | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a715f8a..d1ce131 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ lz4 # Visual solution files *.suo *.user + +# Directories +_codelite/ diff --git a/programs/bench.c b/programs/bench.c index f09c912..b03d562 100644 --- a/programs/bench.c +++ b/programs/bench.c @@ -39,6 +39,10 @@ # define _LARGEFILE64_SOURCE #endif +#if defined(__MINGW32__) && !defined(_POSIX_SOURCE) +# define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */ +#endif + /*-************************************ * Includes diff --git a/programs/lz4cli.c b/programs/lz4cli.c index 12d48d1..59312a0 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -88,7 +88,7 @@ ******************************/ #define COMPRESSOR_NAME "LZ4 command line interface" #ifndef LZ4_VERSION -# define LZ4_VERSION "r128" +# define LZ4_VERSION "r132" #endif #define AUTHOR "Yann Collet" #define WELCOME_MESSAGE "*** %s %i-bits %s, by %s (%s) ***\n", COMPRESSOR_NAME, (int)(sizeof(void*)*8), LZ4_VERSION, AUTHOR, __DATE__ diff --git a/programs/lz4io.c b/programs/lz4io.c index e4823dc..bc1213a 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -42,6 +42,9 @@ #define _LARGE_FILES /* Large file support on 32-bits AIX */ #define _FILE_OFFSET_BITS 64 /* Large file support on 32-bits unix */ +#if defined(__MINGW32__) && !defined(_POSIX_SOURCE) +# define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */ +#endif /***************************** * Includes -- cgit v0.12