summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorfhajny <fhajny>2015-03-23 22:24:11 +0000
committerfhajny <fhajny>2015-03-23 22:24:11 +0000
commit031a219f13115f87581d04161db470f1f70ec31c (patch)
tree8a7cc9b2c2e59440dce7197527a0fef835217f45 /archivers
parent15d7b592e60885d2578379543f300192bf07f4aa (diff)
downloadpkgsrc-031a219f13115f87581d04161db470f1f70ec31c.tar.gz
Update archivers/lz4 to 127.
r127: N/A : added a file on SVN r126: New : lz4frame API is now integrated into liblz4 Fixed : GCC 4.9 bug on highest performance settings, reported by Greg Slazinski Fixed : bug within LZ4 HC streaming mode, reported by James Boyle Fixed : older compiler don't like nameless unions, reported by Cheyi Lin Changed : lz4 is C90 compatible Changed : added -pedantic option, fixed a few mminor warnings r125: Changed : endian and alignment code Changed : directory structure : new "lib" directory Updated : lz4io, now uses lz4frame Improved: slightly improved decoding speed Fixed : LZ4_compress_limitedOutput(); Special thanks to Christopher Speller ! Fixed : some alignment warnings under clang Fixed : deprecated function LZ4_slideInputBufferHC()
Diffstat (limited to 'archivers')
-rw-r--r--archivers/lz4/Makefile4
-rw-r--r--archivers/lz4/PLIST5
-rw-r--r--archivers/lz4/buildlink3.mk6
-rw-r--r--archivers/lz4/distinfo17
-rw-r--r--archivers/lz4/patches/patch-Makefile54
-rw-r--r--archivers/lz4/patches/patch-lib_Makefile66
-rw-r--r--archivers/lz4/patches/patch-programs_Makefile20
-rw-r--r--archivers/lz4/patches/patch-programs_frametest.c9
-rw-r--r--archivers/lz4/patches/patch-programs_fuzzer.c27
9 files changed, 117 insertions, 91 deletions
diff --git a/archivers/lz4/Makefile b/archivers/lz4/Makefile
index 1b30a0b3ec7..11537d61186 100644
--- a/archivers/lz4/Makefile
+++ b/archivers/lz4/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2014/12/12 11:20:56 fhajny Exp $
+# $NetBSD: Makefile,v 1.4 2015/03/23 22:24:11 fhajny Exp $
-DISTNAME= lz4-r124
+DISTNAME= lz4-r127
PKGNAME= ${DISTNAME:S/-r/-/}
CATEGORIES= archivers
MASTER_SITES= -https://github.com/Cyan4973/lz4/archive/${DISTNAME:S/lz4-//}${EXTRACT_SUFX}
diff --git a/archivers/lz4/PLIST b/archivers/lz4/PLIST
index 791d40be69b..01fd398aa33 100644
--- a/archivers/lz4/PLIST
+++ b/archivers/lz4/PLIST
@@ -1,13 +1,14 @@
-@comment $NetBSD: PLIST,v 1.3 2014/12/12 11:20:56 fhajny Exp $
+@comment $NetBSD: PLIST,v 1.4 2015/03/23 22:24:11 fhajny Exp $
bin/lz4
bin/lz4c
bin/lz4cat
include/lz4.h
+include/lz4frame.h
include/lz4hc.h
lib/liblz4.a
lib/liblz4.so
lib/liblz4.so.1
-lib/liblz4.so.1.4.0
+lib/liblz4.so.1.5.0
lib/pkgconfig/liblz4.pc
man/man1/lz4.1
man/man1/lz4c.1
diff --git a/archivers/lz4/buildlink3.mk b/archivers/lz4/buildlink3.mk
index 3dec3784fe6..85349b73c3d 100644
--- a/archivers/lz4/buildlink3.mk
+++ b/archivers/lz4/buildlink3.mk
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.1 2014/08/08 13:16:45 fhajny Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2015/03/23 22:24:11 fhajny Exp $
BUILDLINK_TREE+= lz4
.if !defined(LZ4_BUILDLINK3_MK)
LZ4_BUILDLINK3_MK:=
-BUILDLINK_ABI_DEPENDS.lz4+= lz4>=120
-BUILDLINK_API_DEPENDS.lz4+= lz4>=120
+BUILDLINK_ABI_DEPENDS.lz4+= lz4>=126
+BUILDLINK_API_DEPENDS.lz4+= lz4>=126
BUILDLINK_PKGSRCDIR.lz4?= ../../archivers/lz4
.endif # LZ4_BUILDLINK3_MK
diff --git a/archivers/lz4/distinfo b/archivers/lz4/distinfo
index 000fac9b32d..605634a7453 100644
--- a/archivers/lz4/distinfo
+++ b/archivers/lz4/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.4 2014/12/12 11:20:56 fhajny Exp $
+$NetBSD: distinfo,v 1.5 2015/03/23 22:24:11 fhajny Exp $
-SHA1 (lz4-r124.tar.gz) = ee4943e07d08605041c86c2d2c649b375cee6c13
-RMD160 (lz4-r124.tar.gz) = 04db6431fe188684331418881dc5afe7a7180311
-Size (lz4-r124.tar.gz) = 144148 bytes
-SHA1 (patch-Makefile) = fa460a8c7a5bd14986645429680aeb45c5d51509
-SHA1 (patch-programs_Makefile) = 432cf3ed2d7faf66bddbe76cf06b762fd05203cc
-SHA1 (patch-programs_frametest.c) = 583ece19319b2be8798e32ce43929500deb6ed66
-SHA1 (patch-programs_fuzzer.c) = 6a250ea8c08cf9fb1da3a0350f952512ee11002f
+SHA1 (lz4-r127.tar.gz) = 1aa7d4bb62eb79f88b33f86f9890dc9f96797af5
+RMD160 (lz4-r127.tar.gz) = 1f68ce2228d4d0c19c8ca72c7d2d08c45049e963
+Size (lz4-r127.tar.gz) = 139066 bytes
+SHA1 (patch-Makefile) = 93fd35f5d79431f9ebe3ba1344fd1d7e94a55075
+SHA1 (patch-lib_Makefile) = 7a30b62b8a1507e2c62503e73413a795717e089a
+SHA1 (patch-programs_Makefile) = 4f852a496b1acebfebce36f426c394702c5680d0
+SHA1 (patch-programs_frametest.c) = 0d25ab96df4b615a3e04abed116b6ec16de400df
+SHA1 (patch-programs_fuzzer.c) = 02598b7836b73467ce98d9de6bcf9eadc3fa14ce
diff --git a/archivers/lz4/patches/patch-Makefile b/archivers/lz4/patches/patch-Makefile
index b641a9eff62..345f241ad71 100644
--- a/archivers/lz4/patches/patch-Makefile
+++ b/archivers/lz4/patches/patch-Makefile
@@ -1,22 +1,9 @@
-$NetBSD: patch-Makefile,v 1.3 2014/12/12 11:20:56 fhajny Exp $
+$NetBSD: patch-Makefile,v 1.4 2015/03/23 22:24:11 fhajny Exp $
Make portable, use pkgsrc install scripts.
---- Makefile.orig 2014-11-06 18:39:42.000000000 +0000
+--- Makefile.orig 2014-12-19 08:51:32.000000000 +0000
+++ Makefile
-@@ -33,9 +33,9 @@
- # Version numbers
- VERSION=124
- export RELEASE=r$(VERSION)
--LIBVER_MAJOR=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
--LIBVER_MINOR=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
--LIBVER_PATCH=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
-+LIBVER_MAJOR=`awk '$$2=="LZ4_VERSION_MAJOR" {print $$3}' < lz4.h`
-+LIBVER_MINOR=`awk '$$2=="LZ4_VERSION_MINOR" {print $$3}' < lz4.h`
-+LIBVER_PATCH=`awk '$$2=="LZ4_VERSION_RELEASE" {print $$3}' < lz4.h`
- LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH)
-
- DESTDIR?=
-@@ -122,27 +122,23 @@ clean:
+@@ -86,10 +86,6 @@ clean:
@echo Cleaning completed
@@ -24,39 +11,10 @@ Make portable, use pkgsrc install scripts.
-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
-
- liblz4.pc: liblz4.pc.in Makefile
- @echo creating pkgconfig
-- @sed -e 's|@PREFIX@|$(PREFIX)|' \
-- -e 's|@LIBDIR@|$(LIBDIR)|' \
-- -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
-- -e 's|@VERSION@|$(VERSION)|' \
-+ @sed -e 's|@PREFIX@|$(PREFIX)|g' \
-+ -e 's|@LIBDIR@|$(LIBDIR)|g' \
-+ -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|g' \
-+ -e 's|@VERSION@|$(VERSION)|g' \
- $< >$@
-
- install: liblz4 liblz4.pc
-- @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
-- @install -m 755 liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER)
-- @cp -a liblz4.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)
-- @cp -a liblz4.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
-- @cp -a liblz4.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
-- @install -m 644 liblz4.a $(DESTDIR)$(LIBDIR)/liblz4.a
-- @install -m 644 lz4.h $(DESTDIR)$(INCLUDEDIR)/lz4.h
-- @install -m 644 lz4hc.h $(DESTDIR)$(INCLUDEDIR)/lz4hc.h
-+ $(BSD_INSTALL_DATA_DIR) -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
-+ $(BSD_INSTALL_LIB) -m 755 liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER)
-+ @ln -sf liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_MAJOR)
-+ @ln -sf liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT)
-+ $(BSD_INSTALL_DATA) liblz4.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
-+ $(BSD_INSTALL_LIB) -m 644 liblz4.a $(DESTDIR)$(LIBDIR)/liblz4.a
-+ $(BSD_INSTALL_DATA) -m 644 lz4.h $(DESTDIR)$(INCLUDEDIR)/lz4.h
-+ $(BSD_INSTALL_DATA) -m 644 lz4hc.h $(DESTDIR)$(INCLUDEDIR)/lz4hc.h
- @echo lz4 static and shared library installed
+ install:
+ @cd $(LZ4DIR); $(MAKE) -e install
@cd $(PRGDIR); $(MAKE) -e install
-
-@@ -188,4 +184,3 @@ streaming-examples:
+@@ -133,4 +129,3 @@ streaming-examples:
prg-travis:
@cd $(PRGDIR); $(MAKE) -e test-travis
diff --git a/archivers/lz4/patches/patch-lib_Makefile b/archivers/lz4/patches/patch-lib_Makefile
new file mode 100644
index 00000000000..9e1f855546d
--- /dev/null
+++ b/archivers/lz4/patches/patch-lib_Makefile
@@ -0,0 +1,66 @@
+$NetBSD: patch-lib_Makefile,v 1.1 2015/03/23 22:24:11 fhajny Exp $
+
+Make portable, use pkgsrc install scripts.
+--- lib/Makefile.orig 2014-12-19 08:51:32.000000000 +0000
++++ lib/Makefile
+@@ -33,9 +33,9 @@
+
+ # Version numbers
+ VERSION ?= 126
+-LIBVER_MAJOR=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
+-LIBVER_MINOR=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
+-LIBVER_PATCH=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
++LIBVER_MAJOR=`awk '$$2=="LZ4_VERSION_MAJOR" {print $$3}' < lz4.h`
++LIBVER_MINOR=`awk '$$2=="LZ4_VERSION_MINOR" {print $$3}' < lz4.h`
++LIBVER_PATCH=`awk '$$2=="LZ4_VERSION_RELEASE" {print $$3}' < lz4.h`
+ LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH)
+
+ DESTDIR?=
+@@ -80,28 +80,24 @@ clean:
+ @echo Cleaning library completed
+
+
+-#------------------------------------------------------------------------
+-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
+-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
+-
+ liblz4.pc: liblz4.pc.in Makefile
+ @echo creating pkgconfig
+- @sed -e 's|@PREFIX@|$(PREFIX)|' \
+- -e 's|@LIBDIR@|$(LIBDIR)|' \
+- -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
+- -e 's|@VERSION@|$(VERSION)|' \
++ @sed -e 's|@PREFIX@|$(PREFIX)|g' \
++ -e 's|@LIBDIR@|$(LIBDIR)|g' \
++ -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|g' \
++ -e 's|@VERSION@|$(VERSION)|g' \
+ $< >$@
+
+ install: liblz4 liblz4.pc
+- @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
+- @install -m 755 liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER)
+- @cp -a liblz4.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)
+- @cp -a liblz4.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
+- @cp -a liblz4.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
+- @install -m 644 liblz4.a $(DESTDIR)$(LIBDIR)/liblz4.a
+- @install -m 644 lz4.h $(DESTDIR)$(INCLUDEDIR)/lz4.h
+- @install -m 644 lz4hc.h $(DESTDIR)$(INCLUDEDIR)/lz4hc.h
+- @install -m 644 lz4frame.h $(DESTDIR)$(INCLUDEDIR)/lz4frame.h
++ $(BSD_INSTALL_DATA_DIR) -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
++ $(BSD_INSTALL_LIB) -m 755 liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER)
++ @ln -sf liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_MAJOR)
++ @ln -sf liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT)
++ $(BSD_INSTALL_DATA) liblz4.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
++ $(BSD_INSTALL_LIB) -m 644 liblz4.a $(DESTDIR)$(LIBDIR)/liblz4.a
++ $(BSD_INSTALL_DATA) -m 644 lz4.h $(DESTDIR)$(INCLUDEDIR)/lz4.h
++ $(BSD_INSTALL_DATA) -m 644 lz4hc.h $(DESTDIR)$(INCLUDEDIR)/lz4hc.h
++ $(BSD_INSTALL_DATA) -m 644 lz4frame.h $(DESTDIR)$(INCLUDEDIR)/lz4frame.h
+ @echo lz4 static and shared library installed
+
+ uninstall:
+@@ -113,5 +109,3 @@ uninstall:
+ @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4.h
+ @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4hc.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4hc.h
+ @echo lz4 libraries successfully uninstalled
+-
+-endif
diff --git a/archivers/lz4/patches/patch-programs_Makefile b/archivers/lz4/patches/patch-programs_Makefile
index 39492d58878..486b92a7d9c 100644
--- a/archivers/lz4/patches/patch-programs_Makefile
+++ b/archivers/lz4/patches/patch-programs_Makefile
@@ -1,15 +1,15 @@
-$NetBSD: patch-programs_Makefile,v 1.3 2014/12/12 11:20:56 fhajny Exp $
+$NetBSD: patch-programs_Makefile,v 1.4 2015/03/23 22:24:11 fhajny Exp $
Make portable, use pkgsrc install scripts.
---- programs/Makefile.orig 2014-11-06 18:39:42.000000000 +0000
+--- programs/Makefile.orig 2014-12-19 08:51:32.000000000 +0000
+++ programs/Makefile
@@ -40,7 +40,7 @@ CFLAGS += -std=c99 -Wall -Wextra -Wundef
- FLAGS = -I.. $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
+ FLAGS = -I../lib $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
BINDIR=$(PREFIX)/bin
-MANDIR=$(PREFIX)/share/man/man1
+MANDIR=$(PREFIX)/$(PKGMANDIR)/man1
- LZ4DIR=..
+ LZ4DIR=../lib
TEST_FILES = COPYING
@@ -106,20 +106,16 @@ clean:
@@ -23,12 +23,12 @@ Make portable, use pkgsrc install scripts.
install: lz4 lz4c
@echo Installing binaries
- @install -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
-- @install -m 755 lz4 $(DESTDIR)$(BINDIR)/lz4
+- @install -m 755 lz4$(EXT) $(DESTDIR)$(BINDIR)/lz4$(EXT)
+ $(BSD_INSTALL_PROGRAM_DIR) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
-+ $(BSD_INSTALL_PROGRAM) -m 755 lz4 $(DESTDIR)$(BINDIR)/lz4
- @ln -sf lz4 $(DESTDIR)$(BINDIR)/lz4cat
-- @install -m 755 lz4c $(DESTDIR)$(BINDIR)/lz4c
-+ $(BSD_INSTALL_PROGRAM) -m 755 lz4c $(DESTDIR)$(BINDIR)/lz4c
++ $(BSD_INSTALL_PROGRAM) -m 755 lz4$(EXT) $(DESTDIR)$(BINDIR)/lz4$(EXT)
+ @ln -sf lz4$(EXT) $(DESTDIR)$(BINDIR)/lz4cat
+- @install -m 755 lz4c$(EXT) $(DESTDIR)$(BINDIR)/lz4c$(EXT)
++ $(BSD_INSTALL_PROGRAM) -m 755 lz4c$(EXT) $(DESTDIR)$(BINDIR)/lz4c$(EXT)
@echo Installing man pages
- @install -m 644 lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
- @install -m 644 lz4c.1 $(DESTDIR)$(MANDIR)/lz4c.1
@@ -39,7 +39,7 @@ Make portable, use pkgsrc install scripts.
@echo lz4 installation completed
uninstall:
-@@ -201,4 +197,3 @@ test-mem: lz4 datagen fuzzer frametest
+@@ -203,4 +199,3 @@ test-mem: lz4 datagen fuzzer frametest
test-mem32: lz4c32 datagen
# unfortunately, valgrind doesn't seem to work with non-native binary. If someone knows how to do a valgrind-test on a 32-bits exe with a 64-bits system...
diff --git a/archivers/lz4/patches/patch-programs_frametest.c b/archivers/lz4/patches/patch-programs_frametest.c
index 4f185842e1c..5d83e62a7d7 100644
--- a/archivers/lz4/patches/patch-programs_frametest.c
+++ b/archivers/lz4/patches/patch-programs_frametest.c
@@ -1,15 +1,16 @@
-$NetBSD: patch-programs_frametest.c,v 1.2 2014/12/12 11:20:56 fhajny Exp $
+$NetBSD: patch-programs_frametest.c,v 1.3 2015/03/23 22:24:11 fhajny Exp $
---- programs/frametest.c.orig 2014-11-06 18:39:42.000000000 +0000
+Make portable.
+--- programs/frametest.c.orig 2014-12-19 08:51:32.000000000 +0000
+++ programs/frametest.c
@@ -42,7 +42,7 @@
**************************************/
- #include <stdlib.h>
+ #include <stdlib.h> // free
#include <stdio.h> // fgets, sscanf
-#include <sys/timeb.h> // timeb
+#include <sys/time.h> // timeb
#include <string.h> // strcmp
- #include "lz4frame.h"
+ #include "lz4frame_static.h"
#include "xxhash.h" // XXH64
@@ -113,11 +113,9 @@ static U32 pause = 0;
*********************************************************/
diff --git a/archivers/lz4/patches/patch-programs_fuzzer.c b/archivers/lz4/patches/patch-programs_fuzzer.c
index 2e1dbd1cecf..908ac20c894 100644
--- a/archivers/lz4/patches/patch-programs_fuzzer.c
+++ b/archivers/lz4/patches/patch-programs_fuzzer.c
@@ -1,24 +1,24 @@
-$NetBSD: patch-programs_fuzzer.c,v 1.3 2014/12/12 11:20:56 fhajny Exp $
+$NetBSD: patch-programs_fuzzer.c,v 1.4 2015/03/23 22:24:11 fhajny Exp $
Add portable code for ftime for NetBSD.
Based on https://code.google.com/p/lz4/source/detail?r=81.
---- programs/fuzzer.c.orig 2014-11-06 18:39:42.000000000 +0000
+--- programs/fuzzer.c.orig 2014-12-19 08:51:32.000000000 +0000
+++ programs/fuzzer.c
-@@ -30,6 +30,7 @@ Remove Visual warning messages
- # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
- # pragma warning(disable : 4146) /* disable: C4146: minus unsigned expression */
- # pragma warning(disable : 4310) /* disable: C4310: constant char value > 127 */
+@@ -32,6 +32,7 @@
+ # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
+ # pragma warning(disable : 4146) /* disable: C4146: minus unsigned expression */
+ # pragma warning(disable : 4310) /* disable: C4310: constant char value > 127 */
+# define BMK_LEGACY_TIMER 1
#endif
-@@ -38,12 +39,18 @@ Includes
+@@ -40,12 +41,17 @@
**************************************/
#include <stdlib.h>
- #include <stdio.h> // fgets, sscanf
--#include <sys/timeb.h> // timeb
- #include <string.h> // strcmp
+ #include <stdio.h> /* fgets, sscanf */
+-#include <sys/timeb.h> /* timeb */
+ #include <string.h> /* strcmp */
#include "lz4.h"
#include "lz4hc.h"
#include "xxhash.h"
@@ -29,11 +29,10 @@ Based on https://code.google.com/p/lz4/source/detail?r=81.
+#else
+# include <sys/time.h> // gettimeofday
+#endif
-+
/**************************************
- Basic Types
-@@ -99,8 +106,11 @@ static U32 g_time = 0;
+ * Basic Types
+@@ -100,8 +106,11 @@ static U32 g_time = 0;
/*********************************************************
Fuzzer functions
*********************************************************/
@@ -45,7 +44,7 @@ Based on https://code.google.com/p/lz4/source/detail?r=81.
struct timeb tb;
U32 nCount;
ftime( &tb );
-@@ -108,6 +118,21 @@ static U32 FUZ_GetMilliStart(void)
+@@ -109,6 +118,21 @@ static U32 FUZ_GetMilliStart(void)
return nCount;
}