diff --git a/.travis.yml b/.travis.yml index b7faed3e..536b5a84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,8 @@ env: - ZSTD_TRAVIS_CI_ENV=clangtest - ZSTD_TRAVIS_CI_ENV=gpptest - ZSTD_TRAVIS_CI_ENV=gnu90test + - ZSTD_TRAVIS_CI_ENV=c99test + - ZSTD_TRAVIS_CI_ENV=gnu99test - ZSTD_TRAVIS_CI_ENV=armtest-w-install - ZSTD_TRAVIS_CI_ENV=test - ZSTD_TRAVIS_CI_ENV="-C programs test32" diff --git a/Makefile b/Makefile index e7fca85f..95ecc007 100644 --- a/Makefile +++ b/Makefile @@ -30,9 +30,6 @@ # - zstd homepage : http://www.zstd.net/ # ################################################################ -# force a version number : uncomment below export (otherwise, default to the one declared into zstd.h) -#export VERSION := 0.6.1 - PRGDIR = programs ZSTDDIR = lib @@ -88,11 +85,20 @@ clangtest: clean gpptest: clean $(MAKE) all CC=g++ CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror" -gnu90test: clean - $(MAKE) all CFLAGS="-std=gnu90 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef -Wdeclaration-after-statement -Werror" - c90test: clean - $(MAKE) all CFLAGS="-std=c90 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef -Werror" # will fail, due to // and long long + CFLAGS="-std=c90" $(MAKE) all # will fail, due to // and long long + +gnu90test: clean + CFLAGS="-std=gnu90" $(MAKE) all + +c99test: clean + CFLAGS="-std=c99" $(MAKE) all + +gnu99test: clean + CFLAGS="-std=gnu99" $(MAKE) all + +c11test: clean + CFLAGS="-std=c11" $(MAKE) all bmix64test: clean CFLAGS="-O3 -mbmi -Werror" $(MAKE) -C $(PRGDIR) test diff --git a/lib/Makefile b/lib/Makefile index 5ea014dd..90436695 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -45,7 +45,7 @@ DESTDIR?= PREFIX ?= /usr/local CPPFLAGS= -I./common CFLAGS ?= -O3 -CFLAGS += -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wstrict-aliasing=1 +CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MOREFLAGS) LIBDIR ?= $(PREFIX)/lib diff --git a/lib/common/zstd.h b/lib/common/zstd.h index 7b5708c4..dbcf62ba 100644 --- a/lib/common/zstd.h +++ b/lib/common/zstd.h @@ -61,7 +61,7 @@ extern "C" { ***************************************/ #define ZSTD_VERSION_MAJOR 0 #define ZSTD_VERSION_MINOR 6 -#define ZSTD_VERSION_RELEASE 1 +#define ZSTD_VERSION_RELEASE 2 #define ZSTD_LIB_VERSION ZSTD_VERSION_MAJOR.ZSTD_VERSION_MINOR.ZSTD_VERSION_RELEASE #define ZSTD_QUOTE(str) #str diff --git a/programs/Makefile b/programs/Makefile index 70434ced..68292719 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -31,22 +31,11 @@ # fullbench32: Same as fullbench, but forced to compile in 32-bits mode # ########################################################################## -# Version numbers -LIBVER_MAJOR_SCRIPT:=`sed -n '/define ZSTD_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../lib/common/zstd.h` -LIBVER_MINOR_SCRIPT:=`sed -n '/define ZSTD_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../lib/common/zstd.h` -LIBVER_PATCH_SCRIPT:=`sed -n '/define ZSTD_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../lib/common/zstd.h` -LIBVER_SCRIPT:= $(LIBVER_MAJOR_SCRIPT).$(LIBVER_MINOR_SCRIPT).$(LIBVER_PATCH_SCRIPT) -LIBVER_MAJOR := $(shell echo $(LIBVER_MAJOR_SCRIPT)) -LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT)) -LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) -LIBVER := $(shell echo $(LIBVER_SCRIPT)) -VERSION?= $(LIBVER) - DESTDIR?= PREFIX ?= /usr/local -CPPFLAGS= -I../lib/common -DZSTD_VERSION=\"$(VERSION)\" +CPPFLAGS= -I../lib/common CFLAGS ?= -O3 # -falign-loops=32 # not always beneficial -CFLAGS += -std=c99 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef +CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MOREFLAGS) BINDIR = $(PREFIX)/bin diff --git a/programs/zstdcli.c b/programs/zstdcli.c index 310db7f8..3bb4db70 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -133,6 +133,7 @@ static int usage_advanced(const char* programName) DISPLAY( "--ultra : enable ultra modes (requires more memory to decompress)\n"); #endif #ifndef ZSTD_NODICT + DISPLAY( "\n"); DISPLAY( "Dictionary builder :\n"); DISPLAY( "--train : create a dictionary from a training set of files \n"); DISPLAY( " -o file: `file` is dictionary name (default: %s) \n", g_defaultDictName); @@ -140,6 +141,7 @@ static int usage_advanced(const char* programName) DISPLAY( " -s# : dictionary selectivity level (default: %u)\n", g_defaultSelectivityLevel); #endif #ifndef ZSTD_NOBENCH + DISPLAY( "\n"); DISPLAY( "Benchmark arguments :\n"); DISPLAY( " -b# : benchmark file(s), using # compression level (default : 1) \n"); DISPLAY( " -e# : test all compression levels from -bX to # (default: 1)\n");