updated tests for zlibwrapper C90 strict compatibility
This commit is contained in:
@@ -18,16 +18,16 @@ EXAMPLE_PATH = examples
|
|||||||
PROGRAMS_PATH = ../programs
|
PROGRAMS_PATH = ../programs
|
||||||
TEST_FILE = ../doc/zstd_compression_format.md
|
TEST_FILE = ../doc/zstd_compression_format.md
|
||||||
|
|
||||||
CPPFLAGS = -DXXH_NAMESPACE=ZSTD_ -I$(ZLIB_PATH) -I$(PROGRAMS_PATH) \
|
CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I$(ZLIB_PATH) -I$(PROGRAMS_PATH) \
|
||||||
-I$(ZSTDLIBDIR) -I$(ZSTDLIBDIR)/common -I$(ZLIBWRAPPER_PATH)
|
-I$(ZSTDLIBDIR) -I$(ZSTDLIBDIR)/common -I$(ZLIBWRAPPER_PATH)
|
||||||
STDFLAGS = -std=c90 -pedantic -Wno-long-long -Wno-variadic-macros -Wc++-compat
|
STDCFLAGS = -std=c90 -pedantic -Wno-long-long -Wno-variadic-macros -Wc++-compat \
|
||||||
DEBUGFLAGS=-Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \
|
-DNO_snprintf -DNO_vsnprintf # strict ISO C90 is missing these prototypes
|
||||||
|
DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \
|
||||||
-Wdeclaration-after-statement -Wstrict-prototypes -Wundef \
|
-Wdeclaration-after-statement -Wstrict-prototypes -Wundef \
|
||||||
-Wstrict-aliasing=1
|
-Wstrict-aliasing=1
|
||||||
CFLAGS ?= -O3
|
CFLAGS ?= -O3
|
||||||
CFLAGS += $(STDFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
|
CFLAGS += $(STDFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# Define *.exe as extension for Windows systems
|
# Define *.exe as extension for Windows systems
|
||||||
ifneq (,$(filter Windows%,$(OS)))
|
ifneq (,$(filter Windows%,$(OS)))
|
||||||
EXT =.exe
|
EXT =.exe
|
||||||
@@ -35,6 +35,11 @@ else
|
|||||||
EXT =
|
EXT =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
default : release
|
||||||
|
|
||||||
|
release : STDFLAGS =
|
||||||
|
release : STDCPPFLAGS =
|
||||||
|
release : all
|
||||||
|
|
||||||
all: fitblk example zwrapbench minigzip
|
all: fitblk example zwrapbench minigzip
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -216,7 +216,7 @@ local gzFile gz_open(path, fd, mode)
|
|||||||
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
|
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
|
||||||
(void)snprintf(state.state->path, len + 1, "%s", (const char *)path);
|
(void)snprintf(state.state->path, len + 1, "%s", (const char *)path);
|
||||||
#else
|
#else
|
||||||
strcpy(state.state->path, path);
|
strcpy(state.state->path, (const char*)path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* compute the flags for open() */
|
/* compute the flags for open() */
|
||||||
|
|||||||
Reference in New Issue
Block a user