summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--programs/Makefile3
-rw-r--r--programs/platform.h6
2 files changed, 5 insertions, 4 deletions
diff --git a/programs/Makefile b/programs/Makefile
index 8a271c2..4a8103c 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -44,6 +44,7 @@ LZ4DIR := ../lib
SRCFILES := $(wildcard $(LZ4DIR)/*.c) $(wildcard *.c)
OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
+VOID := /dev/null
CPPFLAGS+= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
CFLAGS ?= -O3
@@ -60,10 +61,8 @@ MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="lz4
# Define *.exe as extension for Windows systems
ifneq (,$(filter Windows%,$(OS)))
-VOID := nul
EXT :=.exe
else
-VOID := /dev/null
EXT :=
endif
diff --git a/programs/platform.h b/programs/platform.h
index f1040c0..f9eb81a 100644
--- a/programs/platform.h
+++ b/programs/platform.h
@@ -59,7 +59,7 @@ extern "C" {
/* *********************************************************
* Turn on Large Files support (>4GB) for 32-bit Linux/Unix
***********************************************************/
-#if !defined(__64BIT__) /* No point defining Large file for 64 bit */
+#if !defined(__64BIT__) || defined(__MINGW32__) /* No point defining Large file for 64 bit but MinGW requires it */
# if !defined(_FILE_OFFSET_BITS)
# define _FILE_OFFSET_BITS 64 /* turn off_t into a 64-bit type for ftello, fseeko */
# endif
@@ -85,7 +85,9 @@ extern "C" {
# define PLATFORM_POSIX_VERSION 200112L
# else
# if defined(__linux__) || defined(__linux)
-# define _POSIX_C_SOURCE 200112L /* use feature test macro */
+# ifndef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200112L /* use feature test macro */
+# endif
# endif
# include <unistd.h> /* declares _POSIX_VERSION */
# if defined(_POSIX_VERSION) /* POSIX compliant */