diff options
author | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2013-10-21 08:03:40 (GMT) |
---|---|---|
committer | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2013-10-21 08:03:40 (GMT) |
commit | a78db582d321446b5167de67eec8ba3239b14bbe (patch) | |
tree | 394401dcd266164afdaf8e8462d81614c79d517d /lz4cli.c | |
parent | 82bf5be9b0e4e5bd3dbdae4ec2aaa9fe8fc693fb (diff) | |
download | lz4-a78db582d321446b5167de67eec8ba3239b14bbe.zip lz4-a78db582d321446b5167de67eec8ba3239b14bbe.tar.gz lz4-a78db582d321446b5167de67eec8ba3239b14bbe.tar.bz2 |
Makefile : support DESTDIR for staged installs. Thanks Jorge Aparicio.
Makefile : make install installs both lz4 and lz4c (Jorge Aparicio)
Makefile : removed -Wno-implicit-declaration compilation switch
lz4cli.c : include <stduni.h> for isatty() (Luca Barbato)
lz4.h : introduced LZ4_MAX_INPUT_SIZE constant (Shay Green)
lz4.h : LZ4_compressBound() : unified macro and inline definitions (Shay Green)
lz4.h : LZ4_decompressSafe_partial() : clarify comments (Shay Green)
lz4.c : LZ4_compress() verify input size condition (Shay Green)
bench.c : corrected a bug in free memory size evaluation
cmake : install into bin/ directory (Richard Yao)
cmake : check for just C compiler (Elan Ruusamae)
git-svn-id: https://lz4.googlecode.com/svn/trunk@107 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'lz4cli.c')
-rw-r--r-- | lz4cli.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -48,9 +48,8 @@ # pragma warning(disable : 4127) // disable: C4127: conditional expression is constant
#endif
-// Large file support on 32-bits unix
-#define _FILE_OFFSET_BITS 64
-
+#define _FILE_OFFSET_BITS 64 // Large file support on 32-bits unix
+#define _POSIX_SOURCE 1 // for fileno() within <stdio.h> on unix
//****************************
// Includes
@@ -71,9 +70,13 @@ #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
# include <fcntl.h> // _O_BINARY
# include <io.h> // _setmode, _isatty
+# ifdef __MINGW32__
+ int _fileno(FILE *stream); // MINGW somehow forgets to include this windows declaration into <stdio.h>
+# endif
# define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY)
# define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
#else
+# include <unistd.h> // isatty
# define SET_BINARY_MODE(file)
# define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
#endif
@@ -103,7 +106,7 @@ // Constants
//****************************
#define COMPRESSOR_NAME "LZ4 Compression CLI"
-#define COMPRESSOR_VERSION "v1.0.6"
+#define COMPRESSOR_VERSION "v1.0.7"
#define COMPILED __DATE__
#define AUTHOR "Yann Collet"
#define LZ4_EXTENSION ".lz4"
|