summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
Diffstat (limited to 'programs')
-rw-r--r--programs/Makefile1
-rw-r--r--programs/lz4cli.c3
-rw-r--r--programs/lz4io.c1
3 files changed, 2 insertions, 3 deletions
diff --git a/programs/Makefile b/programs/Makefile
index 4d8b391..290361f 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -42,6 +42,7 @@ LZ4DIR := ../lib
CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make
CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes
+CFLAGS += $(MOREFLAGS)
CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 8b391f9..961bea1 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -75,9 +75,6 @@
# define _isatty isatty
# define _fileno fileno
# endif
-# ifdef __MINGW32__
- int _fileno(FILE *stream); /* MINGW somehow forgets to include this prototype into <stdio.h> */
-# endif
# define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream))
#else
# include <unistd.h> /* isatty */
diff --git a/programs/lz4io.c b/programs/lz4io.c
index bc1213a..1e9a2f5 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -70,6 +70,7 @@
# if !defined(__DJGPP__)
# define SET_BINARY_MODE(file) { int unused=_setmode(_fileno(file), _O_BINARY); (void)unused; }
# include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */
+# include <WinIoCtl.h> /* FSCTL_SET_SPARSE */
# define SET_SPARSE_FILE_MODE(file) { DWORD dw; DeviceIoControl((HANDLE) _get_osfhandle(_fileno(file)), FSCTL_SET_SPARSE, 0, 0, 0, 0, &dw, 0); }
# if defined(_MSC_VER) && (_MSC_VER >= 1400) /* Avoid MSVC fseek()'s 2GiB barrier */
# define fseek _fseeki64