summaryrefslogtreecommitdiff
path: root/package/maradns
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2015-07-26 01:34:53 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2015-07-26 10:36:35 +0200
commite8a2e04315d138863b743ff3f51af167cbcdae37 (patch)
tree0a2f15efdac735cf0b284e3ee440e967219a2fb9 /package/maradns
parent6533c46eac76c4c7f48db9b66cc891bae7204d00 (diff)
package/maradns: update to version 2.0.09
Additionally: - Also minimize necessary patching. Still a bit hacky, but a lot less intrusive at least. - Allow enabling IPv6 support. - Make sure /etc/maradns/logger exists, necessary for chroot operation Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'package/maradns')
-rw-r--r--package/maradns/Makefile22
-rw-r--r--package/maradns/files/maradns.init2
-rw-r--r--package/maradns/patches/cross-compile-fix.patch20
-rw-r--r--package/maradns/patches/patch-Makefile94
-rw-r--r--package/maradns/patches/patch-build_Makefile_linux36
-rw-r--r--package/maradns/patches/patch-configure19
-rw-r--r--package/maradns/patches/patch-deadwood-3_2_05_src_Makefile22
-rw-r--r--package/maradns/patches/patch-deadwood-3_2_05_src_Makefile_ipv622
-rw-r--r--package/maradns/patches/patch-dns_Makefile30
-rw-r--r--package/maradns/patches/patch-dns_Makefile_recursive21
-rw-r--r--package/maradns/patches/patch-libs_Makefile31
-rw-r--r--package/maradns/patches/patch-parse_Makefile80
-rw-r--r--package/maradns/patches/patch-qual_Makefile12
-rw-r--r--package/maradns/patches/patch-qual_Makefile_threadsafe9
-rw-r--r--package/maradns/patches/patch-rng_Makefile12
-rw-r--r--package/maradns/patches/patch-rng_rng-32bit-tables_h655
-rw-r--r--package/maradns/patches/patch-server_Makefile52
-rw-r--r--package/maradns/patches/patch-server_Makefile_recursive37
-rw-r--r--package/maradns/patches/patch-tcp_Makefile37
-rw-r--r--package/maradns/patches/patch-tcp_Makefile_authonly19
-rw-r--r--package/maradns/patches/patch-tcp_Makefile_ipv620
-rw-r--r--package/maradns/patches/patch-tcp_Makefile_recursive17
-rw-r--r--package/maradns/patches/patch-tools_Makefile_recursive25
23 files changed, 147 insertions, 1147 deletions
diff --git a/package/maradns/Makefile b/package/maradns/Makefile
index 221341df1..524112900 100644
--- a/package/maradns/Makefile
+++ b/package/maradns/Makefile
@@ -4,17 +4,20 @@
include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= maradns
-PKG_VERSION:= 1.4.05
+PKG_VERSION:= 2.0.09
PKG_RELEASE:= 1
-PKG_HASH:= d23ca1301dfff220beed8847466785c077e94bed931cf81668c3a23ae461a680
+PKG_HASH:= e1ee80836f0fbc47b9b94ec839e112ea19c40bed0b70d672d231849a4dea1083
PKG_DESCR:= small and secure DNS server
PKG_SECTION:= net/dns
-PKG_DEPENDS:= libpthread
+PKG_DEPENDS:= libpthread librt
PKG_URL:= http://www.maradns.org
-PKG_SITES:= http://www.maradns.org/download/1.4/${PKG_VERSION}/
+PKG_SITES:= http://maradns.samiam.org/download/2.0/${PKG_VERSION}/
PKG_NOPARALLEL:= 1
-DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+PKG_FLAVOURS_MARADNS:= WITH_IPV6
+PKGFD_WITH_IPV6:= enable IPv6 support
include ${ADK_TOPDIR}/mk/package.mk
@@ -24,14 +27,19 @@ CONFIG_STYLE:= manual
FAKE_FLAGS+= PREFIX="${WRKINST}/usr" \
RPM_BUILD_ROOT="${WRKINST}"
+CONFIGURE_ARGS:=
+ifneq (${ADK_PACKAGE_MARADNS_WITH_IPV6},)
+CONFIGURE_ARGS+= --ipv6
+endif
+
pre-install:
@mkdir -p ${WRKINST}/usr/{sbin,bin,man/man{1,5,8}}
do-configure:
- (cd ${WRKBUILD} && ./configure);
+ (cd ${WRKBUILD} && ./configure ${CONFIGURE_ARGS});
maradns-install:
- ${INSTALL_DIR} ${IDIR_MARADNS}/etc/maradns
+ ${INSTALL_DIR} ${IDIR_MARADNS}/etc/maradns/logger
${INSTALL_DIR} ${IDIR_MARADNS}/usr/bin ${IDIR_MARADNS}/usr/sbin
${INSTALL_DATA} ./files/mararc ${IDIR_MARADNS}/etc/mararc
${INSTALL_DATA} ./files/sample.{zone,ptr} \
diff --git a/package/maradns/files/maradns.init b/package/maradns/files/maradns.init
index 422728165..9b0e3b900 100644
--- a/package/maradns/files/maradns.init
+++ b/package/maradns/files/maradns.init
@@ -13,7 +13,7 @@ autostart)
;;
start)
[ -f /etc/mararc ] || exit
- [ -d /etc/maradns ] || mkdir /etc/maradns
+ [ -d /etc/maradns/logger ] || mkdir -p /etc/maradns/logger
/usr/sbin/maradns &
;;
stop)
diff --git a/package/maradns/patches/cross-compile-fix.patch b/package/maradns/patches/cross-compile-fix.patch
deleted file mode 100644
index 384cd6936..000000000
--- a/package/maradns/patches/cross-compile-fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -urN maradns-1.0.26.old/rng/Makefile maradns-1.0.26.dev/rng/Makefile
---- maradns-1.4.05.orig/rng/Makefile 2006-01-02 17:59:33.000000000 +0100
-+++ maradns-1.4.05/rng/Makefile 2011-01-21 16:47:29.318658272 +0100
-@@ -19,13 +19,13 @@ superclean:
- rm -f $(ROBJECTS) core make_32bit_tables $(TABLES)
-
- rng-alg-fst.o: rng-alg-fst.c rng-alg-fst.h $(TABLES)
-- $(CC) -c $(FLAGS) -o rng-alg-fst.o rng-alg-fst.c
-+ $(CC) -c $(CFLAGS) -o rng-alg-fst.o rng-alg-fst.c
-
- rng-api-fst.o: rng-alg-fst.o rng-api-fst.h
-- $(CC) -c $(FLAGS) -o rng-api-fst.o rng-api-fst.c
-+ $(CC) -c $(CFLAGS) -o rng-api-fst.o rng-api-fst.c
-
- make_32bit_tables: make_32bit_tables.c
-- $(CC) -o make_32bit_tables make_32bit_tables.c
-+ $(CC_FOR_BUILD) -o make_32bit_tables make_32bit_tables.c
-
- rng-32bit-tables.h: make_32bit_tables
- ./make_32bit_tables > rng-32bit-tables.h
diff --git a/package/maradns/patches/patch-Makefile b/package/maradns/patches/patch-Makefile
deleted file mode 100644
index c06bf9a64..000000000
--- a/package/maradns/patches/patch-Makefile
+++ /dev/null
@@ -1,94 +0,0 @@
---- maradns-1.4.05.orig/Makefile 2006-01-02 17:59:33.000000000 +0100
-+++ maradns-1.4.05/Makefile 2011-01-21 16:48:06.124913980 +0100
-@@ -1,15 +1,82 @@
--# This is a wrapper that runs "./configure ; make"
--all:
-- ./compile.sh
-+VERSION=1.4.05
-+COMPILED="Linux system at Fri Jan 21 16:48:06 CET 2011"
-+COMPILED_DEBUG="Linux system at Fri Jan 21 16:48:06 CET 2011 (Debug)"
-+# Server objects
-+SOBJECTS=server/MaraBigHash.o
-+# js_string library (buffer overflow resistant string library) objects
-+JOBJS=libs/JsStr.o libs/JsStrOS.o libs/JsStrCP.o
-+# MaraHash (assosciative array) library objects
-+MHOBJS=libs/MaraHash.o
-+# Parser objects
-+POBJECTS=parse/ParseMaraRc.o parse/ParseCsv1.o ../parse/ParseIpAcl.o
-+# DNS query processing library objects
-+DOBJECTS=dns/Queries.o dns/Compress.o dns/bobbit.o
-+# Secure random number generator objects
-+ROBJECTS=rng/rng-api-fst.o rng/rng-alg-fst.o
-+OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS)
-+EXECS=server/maradns
-
--debug:
-- ./configure ; make debug
-+# Uncomment the following three lines to get this to compile on Solaris
-+# LDFLAGS=-lxnet
-+# CC=gcc $(LDFLAGS) -DSELECT_PROBLEM
-+# M="CC=$(CC)"
-+# These are currently unused, but will be needed again if we use flock() again
-+# CFLAGS=-I/usr/ucbinclude
-+# L="CC=$(CC) $(CFLAGS)"
-+# LDFLAGS=-L/usr/ucblib -lucb -lxnet
-+# end the Solaris section
-+# Non-Solaris version of "M"
-+VER="VERSION=$(VERSION)"
-+Q="DEFINES=-DSELECT_PROBLEM"
-+
-+# Debug
-+
-+CFLAGS ?= -O2 -Wall -DSELECT_PROBLEM
-+M="CC=$(CC)"
-+D="CC=$(CC) -DDEBUG -DTHREADS"
-+#FLAGS = -g
-+
-+all:
-+ cd libs ; make $(M) ; cd ../dns ; make $(M) ; \
-+ cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \
-+ cd ../qual ; make $(M) ; cd ../server ; \
-+ make $(M) $(VER) COMPILED=\"$(COMPILED)\" ; \
-+ cd ../tools ; make $(M) ; \
-+ cd ../tcp ; make $(M) $(VER)
-+
-+debug:
-+ cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \
-+ cd ../dns ; make $(D) ; cd ../rng ; make $(D) ; \
-+ cd ../parse ; make $(D) ; cd ../qual ; make $(D) ; \
-+ cd ../server ; \
-+ make $(D) $(Q) $(V) COMPILED=\"$(COMPILED_DEBUG)\" ; \
-+ cd ../tools ; make $(D) ; \
-+ cd ../tcp ; make $(D) $(V) ; cat ../00README.FIRST
-
- clean:
-- ./configure ; make clean
-+ rm -f $(OBJECTS) core $(EXECS) ; \
-+ cp build/Makefile.w Makefile ; cd dns ; make clean ; \
-+ cd ../libs ; make clean ; cd ../parse ; make clean ; \
-+ cd ../qual ; make clean ; \
-+ cd ../server ; make clean ; \
-+ cp Makefile.recursive Makefile ; \
-+ cd ../test ; make clean ; \
-+ cd ../tools ; make clean ; \
-+ cd misc ; make clean ; \
-+ cd ../../utf8 ; make clean ; \
-+ cd ../tcp ; make clean ; \
-+ cd ../rng ; make clean ; \
-+ cd ../sqa ; make clean ; \
-+ # ; cd .. ; find . -type d | grep .deps | xargs rm -fr ; find . -name '*.o' | xargs rm
-
--uninstall:
-- ./configure ; make uninstall
-+strip:
-+ cd server; strip maradns ; cd ../tcp ; \
-+ strip zoneserver getzone fetchzone ; \
-+ cd ../tools ; strip askmara
-
- install:
-- echo Please compile MaraDNS first
-+ VERSION=$(VERSION) ./build/install.sh
-+
-+uninstall:
-+ VERSION=$(VERSION) ./build/uninstall.sh
-+
diff --git a/package/maradns/patches/patch-build_Makefile_linux b/package/maradns/patches/patch-build_Makefile_linux
index 44b68b5a4..106efd2dd 100644
--- a/package/maradns/patches/patch-build_Makefile_linux
+++ b/package/maradns/patches/patch-build_Makefile_linux
@@ -1,6 +1,12 @@
---- maradns-1.4.05.orig/build/Makefile.linux 2006-11-24 12:44:29.000000000 +0100
-+++ maradns-1.4.05/build/Makefile.linux 2011-01-21 16:36:23.968658279 +0100
-@@ -23,23 +23,23 @@ EXECS=server/maradns
+ - pass CFLAGS to compiler
+ - pass $(M) when compiling deadwood, no idea why that is missing originally
+ - do not pass $(M) when compiling in tcp/, as that would cause problems with
+ the implicit rules in there instead, pass CFLAGS explicitly otherwise
+ they're lost for some reason
+ - do not use V as variable name, conflicts with one from OpenADK
+--- maradns-2.0.09.orig/build/Makefile.linux 2010-08-31 05:56:38.000000000 +0200
++++ maradns-2.0.09/build/Makefile.linux 2014-06-19 03:16:54.570689574 +0200
+@@ -23,33 +23,33 @@ EXECS=server/maradns
# LDFLAGS=-L/usr/ucblib -lucb -lxnet
# end the Solaris section
# Non-Solaris version of "M"
@@ -10,12 +16,11 @@
# Debug
--FLAGS = -O2 -Wall -DSELECT_PROBLEM
+ FLAGS = -O2 -Wall -DSELECT_PROBLEM
-M="CC=$(CC) $(FLAGS)"
-D="CC=$(CC) $(FLAGS) -DDEBUG -DTHREADS"
-+CFLAGS ?= -O2 -Wall -DSELECT_PROBLEM
-+M="CC=$(CC)"
-+D="CC=$(CC) -DDEBUG -DTHREADS"
++M="CC=$(CC) $(CFLAGS) $(FLAGS)"
++D="CC=$(CC) $(CFLAGS) $(FLAGS) -DDEBUG -DTHREADS"
#FLAGS = -g
all:
@@ -25,8 +30,21 @@
- make $(M) $(V) COMPILED=\"$(COMPILED)\" ; \
+ make $(M) $(VER) COMPILED=\"$(COMPILED)\" ; \
cd ../tools ; make $(M) ; \
-- cd ../tcp ; make $(M) $(V) ; cat ../00README.FIRST
-+ cd ../tcp ; make $(M) $(VER)
+- cd ../deadwood-*/src/ ; make FLAGS=-O2 ; \
+- cd ../../tcp ; make $(M) $(V) ; cat ../00README.FIRST
++ cd ../deadwood-*/src/ ; make FLAGS=-O2 $(M) ; \
++ cd ../../tcp ; make CFLAGS="$(CFLAGS)" $(VER) ; cat ../00README.FIRST
debug:
cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \
+ cd ../dns ; make $(D) ; cd ../rng ; make $(D) ; \
+ cd ../parse ; make $(D) ; cd ../qual ; make $(D) ; \
+ cd ../server ; \
+- make $(D) $(Q) $(V) COMPILED=\"$(COMPILED_DEBUG)\" ; \
++ make $(D) $(Q) $(VER) COMPILED=\"$(COMPILED_DEBUG)\" ; \
+ cd ../tools ; make $(D) ; \
+- cd ../tcp ; make $(D) $(V) ; cat ../00README.FIRST
++ cd ../tcp ; make $(D) $(VER) ; cat ../00README.FIRST
+
+ clean:
+ rm -f $(OBJECTS) core $(EXECS) ; \
diff --git a/package/maradns/patches/patch-configure b/package/maradns/patches/patch-configure
deleted file mode 100644
index d6d698a78..000000000
--- a/package/maradns/patches/patch-configure
+++ /dev/null
@@ -1,19 +0,0 @@
---- maradns-1.4.03.orig/configure 2007-10-19 15:54:14.000000000 +0200
-+++ maradns-1.4.03/configure 2010-02-06 00:22:18.533084157 +0100
-@@ -31,12 +31,12 @@ BUILDDIR=build
- export BUILDDIR
-
- # Show them the disclaimer
--cat 00README.FIRST
--echo -----
--echo
-+#cat 00README.FIRST
-+#echo -----
-+#echo
-
- # Try to determine what kind of system we are running
--UNAME=`uname -s`
-+UNAME=Linux
-
- # Make sure the Makefile has the current version number of MaraDNS
- # VERSION is a one line file in the form "VERSION=0.1.23" (without the
diff --git a/package/maradns/patches/patch-deadwood-3_2_05_src_Makefile b/package/maradns/patches/patch-deadwood-3_2_05_src_Makefile
new file mode 100644
index 000000000..a4d879c82
--- /dev/null
+++ b/package/maradns/patches/patch-deadwood-3_2_05_src_Makefile
@@ -0,0 +1,22 @@
+ - set HOSTCC to the right value for OpenADK
+ - maradns, y u no use HOSTCC when appropriate?!
+--- maradns-2.0.09.orig/deadwood-3.2.05/src/Makefile 2011-12-21 20:44:37.000000000 +0100
++++ maradns-2.0.09/deadwood-3.2.05/src/Makefile 2014-06-19 02:48:35.375046777 +0200
+@@ -5,7 +5,7 @@
+ # compiling. When cross-compiling, we still need to compile and
+ # run programs on the build machine, so change the next line when
+ # cross-compiling.
+-HOSTCC=$(CC)
++HOSTCC=$(CC_FOR_BUILD)
+
+ OBJS=DwStr.o \
+ DwMararc.o \
+@@ -68,7 +68,7 @@ DwSys.o: DwSys.c DwStr.h
+ $(CC) $(FLAGS) -Wall -c -o DwSys.o DwSys.c
+
+ RandomPrime: RandomPrime.c
+- $(CC) -O3 -o RandomPrime RandomPrime.c
++ $(HOSTCC) -O3 -o RandomPrime RandomPrime.c
+
+ DwRandPrime.h: RandomPrime
+ if [ -e /dev/urandom ] ; then ./RandomPrime > DwRandPrime.h ; fi
diff --git a/package/maradns/patches/patch-deadwood-3_2_05_src_Makefile_ipv6 b/package/maradns/patches/patch-deadwood-3_2_05_src_Makefile_ipv6
new file mode 100644
index 000000000..e3550df03
--- /dev/null
+++ b/package/maradns/patches/patch-deadwood-3_2_05_src_Makefile_ipv6
@@ -0,0 +1,22 @@
+ - set HOSTCC to the right value for OpenADK
+ - maradns, y u no use HOSTCC when appropriate?!
+--- maradns-2.0.09.orig/deadwood-3.2.05/src/Makefile.ipv6 2012-12-20 19:30:37.000000000 +0100
++++ maradns-2.0.09/deadwood-3.2.05/src/Makefile.ipv6 2014-06-30 05:20:02.061294221 +0200
+@@ -5,7 +5,7 @@
+ # compiling. When cross-compiling, we still need to compile and
+ # run programs on the build machine, so change the next line when
+ # cross-compiling.
+-HOSTCC=$(CC)
++HOSTCC=$(CC_FOR_BUILD)
+
+ OBJS=DwStr.o \
+ DwMararc.o \
+@@ -68,7 +68,7 @@ DwSys.o: DwSys.c DwStr.h
+ $(CC) $(FLAGS) -DIPV6 -Wall -c -o DwSys.o DwSys.c
+
+ RandomPrime: RandomPrime.c
+- $(CC) -O3 -o RandomPrime RandomPrime.c
++ $(HOSTCC) -O3 -o RandomPrime RandomPrime.c
+
+ DwRandPrime.h: RandomPrime
+ if [ -e /dev/urandom ] ; then ./RandomPrime > DwRandPrime.h ; fi
diff --git a/package/maradns/patches/patch-dns_Makefile b/package/maradns/patches/patch-dns_Makefile
deleted file mode 100644
index 81855b3dc..000000000
--- a/package/maradns/patches/patch-dns_Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
---- maradns-1.4.05.orig/dns/Makefile 2005-12-20 11:10:40.000000000 +0100
-+++ maradns-1.4.05/dns/Makefile 2011-01-21 16:48:06.144914132 +0100
-@@ -3,7 +3,7 @@ JOBJS=../libs/JsStr.o ../libs/JsStrOS.o
- MHOBJS=../libs/MaraHash.o
- OBJECTS=$(DOBJECTS) $(JOBJS) $(MHOBJS)
-
--FLAGS = -g -Wall $(DEBUG)
-+#FLAGS = -g -Wall $(DEBUG)
- #FLAGS = -g $(DEBUG)
-
- all: Queries.o Compress.o bobbit.o Decompress.o
-@@ -12,14 +12,14 @@ clean:
- rm -f Queries.o Compress.o bobbit.o Decompress.o
-
- Queries.o: Queries.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o Queries.o Queries.c
-+ $(CC) -c $(CFLAGS) -o Queries.o Queries.c
-
- Compress.o: Compress.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o Compress.o Compress.c
-+ $(CC) -c $(CFLAGS) -o Compress.o Compress.c
-
- Decompress.o: Decompress.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o Decompress.o Decompress.c
-+ $(CC) -c $(CFLAGS) -o Decompress.o Decompress.c
-
- bobbit.o: bobbit.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o bobbit.o bobbit.c
-+ $(CC) -c $(CFLAGS) -o bobbit.o bobbit.c
-
diff --git a/package/maradns/patches/patch-dns_Makefile_recursive b/package/maradns/patches/patch-dns_Makefile_recursive
deleted file mode 100644
index 3e8339140..000000000
--- a/package/maradns/patches/patch-dns_Makefile_recursive
+++ /dev/null
@@ -1,21 +0,0 @@
---- maradns-1.4.05.orig/dns/Makefile.recursive 2006-01-02 17:59:33.000000000 +0100
-+++ maradns-1.4.05/dns/Makefile.recursive 2011-01-21 16:47:09.678658422 +0100
-@@ -12,14 +12,14 @@ clean:
- rm -f Queries.o Compress.o bobbit.o Decompress.o
-
- Queries.o: Queries.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o Queries.o Queries.c
-+ $(CC) -c $(CFLAGS) -o Queries.o Queries.c
-
- Compress.o: Compress.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o Compress.o Compress.c
-+ $(CC) -c $(CFLAGS) -o Compress.o Compress.c
-
- Decompress.o: Decompress.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o Decompress.o Decompress.c
-+ $(CC) -c $(CFLAGS) -o Decompress.o Decompress.c
-
- bobbit.o: bobbit.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o bobbit.o bobbit.c
-+ $(CC) -c $(CFLAGS) -o bobbit.o bobbit.c
-
diff --git a/package/maradns/patches/patch-libs_Makefile b/package/maradns/patches/patch-libs_Makefile
deleted file mode 100644
index 4c8ec3255..000000000
--- a/package/maradns/patches/patch-libs_Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
---- maradns-1.4.05.orig/libs/Makefile 2006-01-02 17:59:33.000000000 +0100
-+++ maradns-1.4.05/libs/Makefile 2011-01-21 16:46:50.568579851 +0100
-@@ -9,22 +9,22 @@ clean:
- rm -f core $(OBJECTS) tests mtest *.exe
-
- MaraHash.o: JsStr.h MaraHash.c
-- $(CC) -c $(FLAGS) -o MaraHash.o MaraHash.c
-+ $(CC) -c $(CFLAGS) -o MaraHash.o MaraHash.c
-
- JsStr.o: JsStr.h JsStr.c
-- $(CC) -c $(FLAGS) -o JsStr.o JsStr.c
-+ $(CC) -c $(CFLAGS) -o JsStr.o JsStr.c
-
- JsStrOS.o: JsStr.h JsStrOS.c
-- $(CC) -c $(FLAGS) -o JsStrOS.o JsStrOS.c
-+ $(CC) -c $(CFLAGS) -o JsStrOS.o JsStrOS.c
-
- JsStrCP.o: JsStr.h JsStrCP.c
-- $(CC) -c $(FLAGS) -o JsStrCP.o JsStrCP.c
-+ $(CC) -c $(CFLAGS) -o JsStrCP.o JsStrCP.c
-
- mtest: mtest.c $(OBJECTS)
-- $(CC) $(FLAGS) -o mtest mtest.c $(OBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o mtest mtest.c $(OBJECTS)
-
- tests: tests.c $(OBJECTS)
-- $(CC) $(FLAGS) -o tests tests.c $(OBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o tests tests.c $(OBJECTS)
-
- #onetime: $(OBJECTS) kiwi.h config.h onetime.c do_scramble.o cryptdate.o
- # $(CC) $(FLAGS) -o onetime onetime.c do_scramble.o cryptdate.o
diff --git a/package/maradns/patches/patch-parse_Makefile b/package/maradns/patches/patch-parse_Makefile
deleted file mode 100644
index b7098c969..000000000
--- a/package/maradns/patches/patch-parse_Makefile
+++ /dev/null
@@ -1,80 +0,0 @@
---- maradns-1.4.05.orig/parse/Makefile 2006-07-18 05:50:44.000000000 +0200
-+++ maradns-1.4.05/parse/Makefile 2011-01-21 16:47:47.994913518 +0100
-@@ -8,8 +8,8 @@ DOBJECTS=../dns/Queries.o ../dns/Compres
- OBJECTS=$(JOBJS) $(MHOBJS) $(POBJECTS) $(DOBJECTS) $(OUTOBJ)
- EXECS=parsetest parsetest2
-
--#FLAGS = -g -Wall $(DEBUG)
--#FLAGS = -g $(DEBUG)
-+#CFLAGS = -g -Wall $(DEBUG)
-+#CFLAGS = -g $(DEBUG)
-
- all: $(POBJECTS) $(OUTOBJ)
-
-@@ -20,50 +20,50 @@ clean:
- cd libs ; make
-
- ParseMaraRc.o: ParseMaraRc.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h ParseMaraRc_en.h
-- $(CC) -c $(FLAGS) -o ParseMaraRc.o ParseMaraRc.c
-+ $(CC) -c $(CFLAGS) -o ParseMaraRc.o ParseMaraRc.c
-
- ParseCsv1.o: ParseCsv1.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o ParseCsv1.o ParseCsv1.c
-+ $(CC) -c $(CFLAGS) -o ParseCsv1.o ParseCsv1.c
-
- ParseIpAcl.o: ParseIpAcl.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o ParseIpAcl.o ParseIpAcl.c
-+ $(CC) -c $(CFLAGS) -o ParseIpAcl.o ParseIpAcl.c
-
- Parse_ipv6.o: Parse_ipv6.c ../libs/MaraHash.h
-- $(CC) -c $(FLAGS) -o Parse_ipv6.o Parse_ipv6.c
-+ $(CC) -c $(CFLAGS) -o Parse_ipv6.o Parse_ipv6.c
-
- Csv2_esc_txt.o: Csv2_esc_txt.c ../libs/JsStr.h
-- $(CC) -c $(FLAGS) -o Csv2_esc_txt.o Csv2_esc_txt.c
-+ $(CC) -c $(CFLAGS) -o Csv2_esc_txt.o Csv2_esc_txt.c
-
- Csv2_main.o: Csv2_main.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_main.o Csv2_main.c
-+ $(CC) -c $(CFLAGS) -o Csv2_main.o Csv2_main.c
-
- Csv2_read.o: Csv2_read.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_read.o Csv2_read.c
-+ $(CC) -c $(CFLAGS) -o Csv2_read.o Csv2_read.c
-
- Csv2_parse.o: Csv2_parse.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_parse.o Csv2_parse.c
-+ $(CC) -c $(CFLAGS) -o Csv2_parse.o Csv2_parse.c
-
- Csv2_rr_aaaa.o: Csv2_rr_aaaa.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_rr_aaaa.o Csv2_rr_aaaa.c
-+ $(CC) -c $(CFLAGS) -o Csv2_rr_aaaa.o Csv2_rr_aaaa.c
-
- Csv2_rr_wks.o: Csv2_rr_wks.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_rr_wks.o Csv2_rr_wks.c
-+ $(CC) -c $(CFLAGS) -o Csv2_rr_wks.o Csv2_rr_wks.c
-
- Csv2_rr_a.o: Csv2_rr_a.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_rr_a.o Csv2_rr_a.c
-+ $(CC) -c $(CFLAGS) -o Csv2_rr_a.o Csv2_rr_a.c
-
- Csv2_rr_soa.o: Csv2_rr_soa.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_rr_soa.o Csv2_rr_soa.c
-+ $(CC) -c $(CFLAGS) -o Csv2_rr_soa.o Csv2_rr_soa.c
-
- Csv2_rr_txt.o: Csv2_rr_txt.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_rr_txt.o Csv2_rr_txt.c
-+ $(CC) -c $(CFLAGS) -o Csv2_rr_txt.o Csv2_rr_txt.c
-
- Csv2_database.o: Csv2_database.c ../libs/JsStr.h Csv2_read.h
-- $(CC) -c $(FLAGS) -o Csv2_database.o Csv2_database.c
-+ $(CC) -c $(CFLAGS) -o Csv2_database.o Csv2_database.c
-
- parsetest: parsetest.c $(OBJECTS)
-- $(CC) $(FLAGS) -o parsetest parsetest.c $(OBJECTS)
-+ $(CC) $(CFLAGS) -o parsetest parsetest.c $(OBJECTS)
-
- parsetest2: parsetest2.c $(OBJECTS)
-- $(CC) $(FLAGS) -o parsetest2 parsetest2.c $(OBJECTS)
-+ $(CC) $(CFLAGS) -o parsetest2 parsetest2.c $(OBJECTS)
-
diff --git a/package/maradns/patches/patch-qual_Makefile b/package/maradns/patches/patch-qual_Makefile
deleted file mode 100644
index b78ce7096..000000000
--- a/package/maradns/patches/patch-qual_Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
---- maradns-1.4.03.orig/qual/Makefile 2006-01-02 17:59:33.000000000 +0100
-+++ maradns-1.4.03/qual/Makefile 2010-02-06 00:19:48.481829524 +0100
-@@ -2,9 +2,6 @@ DOBJECTS=qual_timestamp.o
- JOBJS=../libs/JsStr.o ../libs/JsStrOS.o ../libs/JsStrCP.o
- OBJECTS=$(DOBJECTS)
-
--#FLAGS = -g -Wall $(DEBUG)
--#FLAGS = -g $(DEBUG)
--
- all: qual_timestamp.o
-
- clean:
diff --git a/package/maradns/patches/patch-qual_Makefile_threadsafe b/package/maradns/patches/patch-qual_Makefile_threadsafe
deleted file mode 100644
index 81ef93c77..000000000
--- a/package/maradns/patches/patch-qual_Makefile_threadsafe
+++ /dev/null
@@ -1,9 +0,0 @@
---- maradns-1.4.05.orig/qual/Makefile.threadsafe 2006-01-22 06:22:01.000000000 +0100
-+++ maradns-1.4.05/qual/Makefile.threadsafe 2011-01-21 16:48:40.348658539 +0100
-@@ -8,5 +8,5 @@ clean:
- rm -f qual_timestamp.o
-
- qual_timestamp.o: qual_timestamp.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o qual_timestamp.o qual_timestamp.c
-+ $(CC) -c $(CFLAGS) -o qual_timestamp.o qual_timestamp.c
-
diff --git a/package/maradns/patches/patch-rng_Makefile b/package/maradns/patches/patch-rng_Makefile
new file mode 100644
index 000000000..7de1ad94b
--- /dev/null
+++ b/package/maradns/patches/patch-rng_Makefile
@@ -0,0 +1,12 @@
+ use host compiler to compile table generator
+--- maradns-2.0.09.orig/rng/Makefile 2006-01-02 17:59:33.000000000 +0100
++++ maradns-2.0.09/rng/Makefile 2014-06-19 02:40:59.777845739 +0200
+@@ -25,7 +25,7 @@ rng-api-fst.o: rng-alg-fst.o rng-api-fst
+ $(CC) -c $(FLAGS) -o rng-api-fst.o rng-api-fst.c
+
+ make_32bit_tables: make_32bit_tables.c
+- $(CC) -o make_32bit_tables make_32bit_tables.c
++ $(CC_FOR_BUILD) -o make_32bit_tables make_32bit_tables.c
+
+ rng-32bit-tables.h: make_32bit_tables
+ ./make_32bit_tables > rng-32bit-tables.h
diff --git a/package/maradns/patches/patch-rng_rng-32bit-tables_h b/package/maradns/patches/patch-rng_rng-32bit-tables_h
deleted file mode 100644
index 2f4647940..000000000
--- a/package/maradns/patches/patch-rng_rng-32bit-tables_h
+++ /dev/null
@@ -1,655 +0,0 @@
---- maradns-1.4.05.orig/rng/rng-32bit-tables.h 2010-09-25 16:14:04.000000000 +0200
-+++ maradns-1.4.05/rng/rng-32bit-tables.h 2011-01-21 16:25:33.324914221 +0100
-@@ -1,332 +1,332 @@
- /* This file is automatically generated by the program make_32bit_tables.c */
-
- static const u32 Te0[256] = {
--0xb3e2509bU, 0x63b4ca06U, 0x85e4a2d4U, 0x216c4602U,
--0x3a6f3fa8U, 0xa616bd75U, 0x134d0610U, 0x4d60b99cU,
--0x176ab44dU, 0x7f41f98eU, 0xe277da8fU, 0xcdec08c9U,
--0x5a0a0dd1U, 0x1b0379aaU, 0x7b664bd3U, 0xa1e0f757U,
--0xfaa55b5aU, 0xea39a535U, 0xc5a27773U, 0xb17c0938U,
--0x2023e7deU, 0xd47128c0U, 0x7c9001f1U, 0x22bdbe7dU,
--0xec804ecbU, 0xb9327682U, 0xbd15c4dfU, 0xc9cbba94U,
--0xa488e4d6U, 0x014fa1dcU, 0x60653279U, 0xfe82e907U,
--0x74de7e4bU, 0xa8e12931U, 0x0427b25dU, 0xe65068d2U,
--0x898d6f33U, 0x928e1699U, 0x1202a7ccU, 0x7a29ea0fU,
--0x1f24cbf7U, 0x64428024U, 0xdd70f6a6U, 0xbec43ca0U,
--0x2d058be5U, 0x15f4edeeU, 0x572c61eaU, 0x1cf53388U,
--0xf974a325U, 0x4046d5a7U, 0x2bbc601bU, 0xdea10ed9U,
--0x42d88c04U, 0x8f3484cdU, 0x5f621e50U, 0x835d492aU,
--0xf51d6ec2U, 0x2f9bd246U, 0xbf8b9d7cU, 0xee1e1768U,
--0x6c0cff9eU, 0x16251591U, 0x37495393U, 0x5cb3e62fU,
--0x3f072c29U, 0x4bd95262U, 0x05681381U, 0x90104f3aU,
--0x03d1f87fU, 0x5244726bU, 0xd53e891cU, 0x9ac06923U,
--0x51958a14U, 0x915feee6U, 0xdfeeaf05U, 0x79f81270U,
--0xd2c8c33eU, 0x39bec7d7U, 0x764027e8U, 0x4808aa1dU,
--0xcf72516aU, 0x269a0c20U, 0xab30d14eU, 0xc2543d51U,
--0x770f8634U, 0xa0af568bU, 0x27d5adfcU, 0x4ffee03fU,
--0xb4141ab9U, 0x8ce57cb2U, 0x2af3c1c7U, 0xdbc91d58U,
--0xd6ef7163U, 0x3cd6d456U, 0x5b45ac0dU, 0x3e488df5U,
--0x32214012U, 0xe1a622f0U, 0x9b8fc8ffU, 0x43972dd8U,
--0xcca3a915U, 0x286d9864U, 0x31f0b86dU, 0x3498abecU,
--0x73283469U, 0x6fdd07e1U, 0x682b4dc3U, 0x66dcd987U,
--0x5663c036U, 0x62fb6bdaU, 0x95785cbbU, 0xe71fc90eU,
--0x726795b5U, 0xcb55e337U, 0x5dfc47f3U, 0x70f9cc16U,
--0xb68a431aU, 0x81c31089U, 0xe4ce3171U, 0x0d266c3bU,
--0xacc69b6cU, 0x985e3080U, 0xda86bc84U, 0x6d435e42U,
--0x6964ec1fU, 0x06b9ebfeU, 0x84ab0308U, 0xbae38efdU,
--0x11d35fb3U, 0x00000000U, 0x0ef79444U, 0xfbeafa86U,
--0xbbac2f21U, 0x650d21f8U, 0xae58c2cfU, 0x86355aabU,
--0x612a93a5U, 0xf452cf1eU, 0x446167faU, 0x877afb77U,
--0xf3a4853cU, 0xa7591ca9U, 0x7ddfa02dU, 0x58945472U,
--0x9c7982ddU, 0xd818e527U, 0x336ee1ceU, 0x07f64a22U,
--0xa5c7450aU, 0x808cb155U, 0xb7c5e2c6U, 0xef51b6b4U,
--0x3606f24fU, 0xffcd48dbU, 0x55b23849U, 0x6bfab5bcU,
--0x4eb141e3U, 0x8e7b2511U, 0x6ab51460U, 0xfd531178U,
--0x18d281d5U, 0xd38762e2U, 0xf2eb24e0U, 0xca1a42ebU,
--0xdc3f577aU, 0x88c2ceefU, 0x8daadd6eU, 0x029e59a3U,
--0x199d2009U, 0xb033a8e4U, 0x0901de66U, 0x0c69cde7U,
--0x0fb83598U, 0xf7833761U, 0xf6cc96bdU, 0x78b7b3acU,
--0x7591df97U, 0x49470bc1U, 0xe58190adU, 0x97e60518U,
--0xd7a0d0bfU, 0x4a96f3beU, 0x9fa87aa2U, 0xe9e85d4aU,
--0x0b9f87c5U, 0x452ec626U, 0xbc5a6503U, 0xd95744fbU,
--0x9911915cU, 0x96a9a4c4U, 0x46ff3e59U, 0x4c2f1840U,
--0x9437fd67U, 0xe3387b53U, 0x3d99758aU, 0xc73c2ed0U,
--0x2c4a2a39U, 0x254bf45fU, 0x23f21fa1U, 0x1a4cd876U,
--0xd0569a9dU, 0xb87dd75eU, 0x1dba9254U, 0x38f1660bU,
--0xa2310f28U, 0x5e2dbf8cU, 0x47b09f85U, 0x14bb4c32U,
--0xa9ae88edU, 0x50da2bc8U, 0x24045583U, 0xeb7604e9U,
--0xb55bbb65U, 0x1e6b6a2bU, 0x8212e8f6U, 0xf13adc9fU,
--0xc0ca64f2U, 0x084e7fbaU, 0xa37eaef4U, 0x35d70a30U,
--0xedcfef17U, 0xe0e9832cU, 0x30bf19b1U, 0x9ee7db7eU,
--0xe8a7fc96U, 0x93c1b745U, 0xfc1cb0a4U, 0xb2adf147U,
--0x109cfe6fU, 0xad893ab0U, 0xaf176313U, 0x2ed4739aU,
--0x6e92a63dU, 0x9d362301U, 0xf83b02f9U, 0xc6738f0cU,
--0xc185c52eU, 0xc8841b48U, 0x6793785bU, 0xaa7f7092U,
--0x4109747bU, 0xc31b9c8dU, 0x71b66dcaU, 0x8b133690U,
--0xd1193b41U, 0x54fd9995U, 0xc4edd6afU, 0x7e0e5852U,
--0x3b209e74U, 0x8a5c974cU, 0xf0757d43U, 0x59dbf5aeU,
--0xce3df0b6U, 0x530bd3b7U, 0x0ad02619U, 0x292239b8U,
-+0xb3e2509bU, 0x63b4ca06U, 0x85e4a2d4U, 0x216c4602U,
-+0x3a6f3fa8U, 0xa616bd75U, 0x134d0610U, 0x4d60b99cU,
-+0x176ab44dU, 0x7f41f98eU, 0xe277da8fU, 0xcdec08c9U,
-+0x5a0a0dd1U, 0x1b0379aaU, 0x7b664bd3U, 0xa1e0f757U,
-+0xfaa55b5aU, 0xea39a535U, 0xc5a27773U, 0xb17c0938U,
-+0x2023e7deU, 0xd47128c0U, 0x7c9001f1U, 0x22bdbe7dU,
-+0xec804ecbU, 0xb9327682U, 0xbd15c4dfU, 0xc9cbba94U,
-+0xa488e4d6U, 0x014fa1dcU, 0x60653279U, 0xfe82e907U,
-+0x74de7e4bU, 0xa8e12931U, 0x0427b25dU, 0xe65068d2U,
-+0x898d6f33U, 0x928e1699U, 0x1202a7ccU, 0x7a29ea0fU,
-+0x1f24cbf7U, 0x64428024U, 0xdd70f6a6U, 0xbec43ca0U,
-+0x2d058be5U, 0x15f4edeeU, 0x572c61eaU, 0x1cf53388U,
-+0xf974a325U, 0x4046d5a7U, 0x2bbc601bU, 0xdea10ed9U,
-+0x42d88c04U, 0x8f3484cdU, 0x5f621e50U, 0x835d492aU,
-+0xf51d6ec2U, 0x2f9bd246U, 0xbf8b9d7cU, 0xee1e1768U,
-+0x6c0cff9eU, 0x16251591U, 0x37495393U, 0x5cb3e62fU,
-+0x3f072c29U, 0x4bd95262U, 0x05681381U, 0x90104f3aU,
-+0x03d1f87fU, 0x5244726bU, 0xd53e891cU, 0x9ac06923U,
-+0x51958a14U, 0x915feee6U, 0xdfeeaf05U, 0x79f81270U,
-+0xd2c8c33eU, 0x39bec7d7U, 0x764027e8U, 0x4808aa1dU,
-+0xcf72516aU, 0x269a0c20U, 0xab30d14eU, 0xc2543d51U,
-+0x770f8634U, 0xa0af568bU, 0x27d5adfcU, 0x4ffee03fU,
-+0xb4141ab9U, 0x8ce57cb2U, 0x2af3c1c7U, 0xdbc91d58U,
-+0xd6ef7163U, 0x3cd6d456U, 0x5b45ac0dU, 0x3e488df5U,
-+0x32214012U, 0xe1a622f0U, 0x9b8fc8ffU, 0x43972dd8U,
-+0xcca3a915U, 0x286d9864U, 0x31f0b86dU, 0x3498abecU,
-+0x73283469U, 0x6fdd07e1U, 0x682b4dc3U, 0x66dcd987U,
-+0x5663c036U, 0x62fb6bdaU, 0x95785cbbU, 0xe71fc90eU,
-+0x726795b5U, 0xcb55e337U, 0x5dfc47f3U, 0x70f9cc16U,
-+0xb68a431aU, 0x81c31089U, 0xe4ce3171U, 0x0d266c3bU,
-+0xacc69b6cU, 0x985e3080U, 0xda86bc84U, 0x6d435e42U,
-+0x6964ec1fU, 0x06b9ebfeU, 0x84ab0308U, 0xbae38efdU,
-+0x11d35fb3U, 0x00000000U, 0x0ef79444U, 0xfbeafa86U,
-+0xbbac2f21U, 0x650d21f8U, 0xae58c2cfU, 0x86355aabU,
-+0x612a93a5U, 0xf452cf1eU, 0x446167faU, 0x877afb77U,
-+0xf3a4853cU, 0xa7591ca9U, 0x7ddfa02dU, 0x58945472U,
-+0x9c7982ddU, 0xd818e527U, 0x336ee1ceU, 0x07f64a22U,
-+0xa5c7450aU, 0x808cb155U, 0xb7c5e2c6U, 0xef51b6b4U,
-+0x3606f24fU, 0xffcd48dbU, 0x55b23849U, 0x6bfab5bcU,
-+0x4eb141e3U, 0x8e7b2511U, 0x6ab51460U, 0xfd531178U,
-+0x18d281d5U, 0xd38762e2U, 0xf2eb24e0U, 0xca1a42ebU,
-+0xdc3f577aU, 0x88c2ceefU, 0x8daadd6eU, 0x029e59a3U,
-+0x199d2009U, 0xb033a8e4U, 0x0901de66U, 0x0c69cde7U,
-+0x0fb83598U, 0xf7833761U, 0xf6cc96bdU, 0x78b7b3acU,
-+0x7591df97U, 0x49470bc1U, 0xe58190adU, 0x97e60518U,
-+0xd7a0d0bfU, 0x4a96f3beU, 0x9fa87aa2U, 0xe9e85d4aU,
-+0x0b9f87c5U, 0x452ec626U, 0xbc5a6503U, 0xd95744fbU,
-+0x9911915cU, 0x96a9a4c4U, 0x46ff3e59U, 0x4c2f1840U,
-+0x9437fd67U, 0xe3387b53U, 0x3d99758aU, 0xc73c2ed0U,
-+0x2c4a2a39U, 0x254bf45fU, 0x23f21fa1U, 0x1a4cd876U,
-+0xd0569a9dU, 0xb87dd75eU, 0x1dba9254U, 0x38f1660bU,
-+0xa2310f28U, 0x5e2dbf8cU, 0x47b09f85U, 0x14bb4c32U,
-+0xa9ae88edU, 0x50da2bc8U, 0x24045583U, 0xeb7604e9U,
-+0xb55bbb65U, 0x1e6b6a2bU, 0x8212e8f6U, 0xf13adc9fU,
-+0xc0ca64f2U, 0x084e7fbaU, 0xa37eaef4U, 0x35d70a30U,
-+0xedcfef17U, 0xe0e9832cU, 0x30bf19b1U, 0x9ee7db7eU,
-+0xe8a7fc96U, 0x93c1b745U, 0xfc1cb0a4U, 0xb2adf147U,
-+0x109cfe6fU, 0xad893ab0U, 0xaf176313U, 0x2ed4739aU,
-+0x6e92a63dU, 0x9d362301U, 0xf83b02f9U, 0xc6738f0cU,
-+0xc185c52eU, 0xc8841b48U, 0x6793785bU, 0xaa7f7092U,
-+0x4109747bU, 0xc31b9c8dU, 0x71b66dcaU, 0x8b133690U,
-+0xd1193b41U, 0x54fd9995U, 0xc4edd6afU, 0x7e0e5852U,
-+0x3b209e74U, 0x8a5c974cU, 0xf0757d43U, 0x59dbf5aeU,
-+0xce3df0b6U, 0x530bd3b7U, 0x0ad02619U, 0x292239b8U,
- };
- static const u32 Te1[256] = {
--0x9bb3e250U, 0x0663b4caU, 0xd485e4a2U, 0x02216c46U,
--0xa83a6f3fU, 0x75a616bdU, 0x10134d06U, 0x9c4d60b9U,
--0x4d176ab4U, 0x8e7f41f9U, 0x8fe277daU, 0xc9cdec08U,
--0xd15a0a0dU, 0xaa1b0379U, 0xd37b664bU, 0x57a1e0f7U,
--0x5afaa55bU, 0x35ea39a5U, 0x73c5a277U, 0x38b17c09U,
--0xde2023e7U, 0xc0d47128U, 0xf17c9001U, 0x7d22bdbeU,
--0xcbec804eU, 0x82b93276U, 0xdfbd15c4U, 0x94c9cbbaU,
--0xd6a488e4U, 0xdc014fa1U, 0x79606532U, 0x07fe82e9U,
--0x4b74de7eU, 0x31a8e129U, 0x5d0427b2U, 0xd2e65068U,
--0x33898d6fU, 0x99928e16U, 0xcc1202a7U, 0x0f7a29eaU,
--0xf71f24cbU, 0x24644280U, 0xa6dd70f6U, 0xa0bec43cU,
--0xe52d058bU, 0xee15f4edU, 0xea572c61U, 0x881cf533U,
--0x25f974a3U, 0xa74046d5U, 0x1b2bbc60U, 0xd9dea10eU,
--0x0442d88cU, 0xcd8f3484U, 0x505f621eU, 0x2a835d49U,
--0xc2f51d6eU, 0x462f9bd2U, 0x7cbf8b9dU, 0x68ee1e17U,
--0x9e6c0cffU, 0x91162515U, 0x93374953U, 0x2f5cb3e6U,
--0x293f072cU, 0x624bd952U, 0x81056813U, 0x3a90104fU,
--0x7f03d1f8U, 0x6b524472U, 0x1cd53e89U, 0x239ac069U,
--0x1451958aU, 0xe6915feeU, 0x05dfeeafU, 0x7079f812U,
--0x3ed2c8c3U, 0xd739bec7U, 0xe8764027U, 0x1d4808aaU,
--0x6acf7251U, 0x20269a0cU, 0x4eab30d1U, 0x51c2543dU,
--0x34770f86U, 0x8ba0af56U, 0xfc27d5adU, 0x3f4ffee0U,
--0xb9b4141aU, 0xb28ce57cU, 0xc72af3c1U, 0x58dbc91dU,
--0x63d6ef71U, 0x563cd6d4U, 0x0d5b45acU, 0xf53e488dU,
--0x12322140U, 0xf0e1a622U, 0xff9b8fc8U, 0xd843972dU,
--0x15cca3a9U, 0x64286d98U, 0x6d31f0b8U, 0xec3498abU,
--0x69732834U, 0xe16fdd07U, 0xc3682b4dU, 0x8766dcd9U,
--0x365663c0U, 0xda62fb6bU, 0xbb95785cU, 0x0ee71fc9U,
--0xb5726795U, 0x37cb55e3U, 0xf35dfc47U, 0x1670f9ccU,
--0x1ab68a43U, 0x8981c310U, 0x71e4ce31U, 0x3b0d266cU,
--0x6cacc69bU, 0x80985e30U, 0x84da86bcU, 0x426d435eU,
--0x1f6964ecU, 0xfe06b9ebU, 0x0884ab03U, 0xfdbae38eU,
--0xb311d35fU, 0x00000000U, 0x440ef794U, 0x86fbeafaU,
--0x21bbac2fU, 0xf8650d21U, 0xcfae58c2U, 0xab86355aU,
--0xa5612a93U, 0x1ef452cfU, 0xfa446167U, 0x77877afbU,
--0x3cf3a485U, 0xa9a7591cU, 0x2d7ddfa0U, 0x72589454U,
--0xdd9c7982U, 0x27d818e5U, 0xce336ee1U, 0x2207f64aU,
--0x0aa5c745U, 0x55808cb1U, 0xc6b7c5e2U, 0xb4ef51b6U,
--0x4f3606f2U, 0xdbffcd48U, 0x4955b238U, 0xbc6bfab5U,
--0xe34eb141U, 0x118e7b25U, 0x606ab514U, 0x78fd5311U,
--0xd518d281U, 0xe2d38762U, 0xe0f2eb24U, 0xebca1a42U,
--0x7adc3f57U, 0xef88c2ceU, 0x6e8daaddU, 0xa3029e59U,
--0x09199d20U, 0xe4b033a8U, 0x660901deU, 0xe70c69cdU,
--0x980fb835U, 0x61f78337U, 0xbdf6cc96U, 0xac78b7b3U,
--0x977591dfU, 0xc149470bU, 0xade58190U, 0x1897e605U,
--0xbfd7a0d0U, 0xbe4a96f3U, 0xa29fa87aU, 0x4ae9e85dU,
--0xc50b9f87U, 0x26452ec6U, 0x03bc5a65U, 0xfbd95744U,
--0x5c991191U, 0xc496a9a4U, 0x5946ff3eU, 0x404c2f18U,
--0x679437fdU, 0x53e3387bU, 0x8a3d9975U, 0xd0c73c2eU,
--0x392c4a2aU, 0x5f254bf4U, 0xa123f21fU, 0x761a4cd8U,
--0x9dd0569aU, 0x5eb87dd7U, 0x541dba92U, 0x0b38f166U,
--0x28a2310fU, 0x8c5e2dbfU, 0x8547b09fU, 0x3214bb4cU,
--0xeda9ae88U, 0xc850da2bU, 0x83240455U, 0xe9eb7604U,
--0x65b55bbbU, 0x2b1e6b6aU, 0xf68212e8U, 0x9ff13adcU,
--0xf2c0ca64U, 0xba084e7fU, 0xf4a37eaeU, 0x3035d70aU,
--0x17edcfefU, 0x2ce0e983U, 0xb130bf19U, 0x7e9ee7dbU,
--0x96e8a7fcU, 0x4593c1b7U, 0xa4fc1cb0U, 0x47b2adf1U,
--0x6f109cfeU, 0xb0ad893aU, 0x13af1763U, 0x9a2ed473U,
--0x3d6e92a6U, 0x019d3623U, 0xf9f83b02U, 0x0cc6738fU,
--0x2ec185c5U, 0x48c8841bU, 0x5b679378U, 0x92aa7f70U,
--0x7b410974U, 0x8dc31b9cU, 0xca71b66dU, 0x908b1336U,
--0x41d1193bU, 0x9554fd99U, 0xafc4edd6U, 0x527e0e58U,
--0x743b209eU, 0x4c8a5c97U, 0x43f0757dU, 0xae59dbf5U,
--0xb6ce3df0U, 0xb7530bd3U, 0x190ad026U, 0xb8292239U,
-+0x9bb3e250U, 0x0663b4caU, 0xd485e4a2U, 0x02216c46U,
-+0xa83a6f3fU, 0x75a616bdU, 0x10134d06U, 0x9c4d60b9U,
-+0x4d176ab4U, 0x8e7f41f9U, 0x8fe277daU, 0xc9cdec08U,
-+0xd15a0a0dU, 0xaa1b0379U, 0xd37b664bU, 0x57a1e0f7U,
-+0x5afaa55bU, 0x35ea39a5U, 0x73c5a277U, 0x38b17c09U,
-+0xde2023e7U, 0xc0d47128U, 0xf17c9001U, 0x7d22bdbeU,
-+0xcbec804eU, 0x82b93276U, 0xdfbd15c4U, 0x94c9cbbaU,
-+0xd6a488e4U, 0xdc014fa1U, 0x79606532U, 0x07fe82e9U,
-+0x4b74de7eU, 0x31a8e129U, 0x5d0427b2U, 0xd2e65068U,
-+0x33898d6fU, 0x99928e16U, 0xcc1202a7U, 0x0f7a29eaU,
-+0xf71f24cbU, 0x24644280U, 0xa6dd70f6U, 0xa0bec43cU,
-+0xe52d058bU, 0xee15f4edU, 0xea572c61U, 0x881cf533U,
-+0x25f974a3U, 0xa74046d5U, 0x1b2bbc60U, 0xd9dea10eU,
-+0x0442d88cU, 0xcd8f3484U, 0x505f621eU, 0x2a835d49U,
-+0xc2f51d6eU, 0x462f9bd2U, 0x7cbf8b9dU, 0x68ee1e17U,
-+0x9e6c0cffU, 0x91162515U, 0x93374953U, 0x2f5cb3e6U,
-+0x293f072cU, 0x624bd952U, 0x81056813U, 0x3a90104fU,
-+0x7f03d1f8U, 0x6b524472U, 0x1cd53e89U, 0x239ac069U,
-+0x1451958aU, 0xe6915feeU, 0x05dfeeafU, 0x7079f812U,
-+0x3ed2c8c3U, 0xd739bec7U, 0xe8764027U, 0x1d4808aaU,
-+0x6acf7251U, 0x20269a0cU, 0x4eab30d1U, 0x51c2543dU,
-+0x34770f86U, 0x8ba0af56U, 0xfc27d5adU, 0x3f4ffee0U,
-+0xb9b4141aU, 0xb28ce57cU, 0xc72af3c1U, 0x58dbc91dU,
-+0x63d6ef71U, 0x563cd6d4U, 0x0d5b45acU, 0xf53e488dU,
-+0x12322140U, 0xf0e1a622U, 0xff9b8fc8U, 0xd843972dU,
-+0x15cca3a9U, 0x64286d98U, 0x6d31f0b8U, 0xec3498abU,
-+0x69732834U, 0xe16fdd07U, 0xc3682b4dU, 0x8766dcd9U,
-+0x365663c0U, 0xda62fb6bU, 0xbb95785cU, 0x0ee71fc9U,
-+0xb5726795U, 0x37cb55e3U, 0xf35dfc47U, 0x1670f9ccU,
-+0x1ab68a43U, 0x8981c310U, 0x71e4ce31U, 0x3b0d266cU,
-+0x6cacc69bU, 0x80985e30U, 0x84da86bcU, 0x426d435eU,
-+0x1f6964ecU, 0xfe06b9ebU, 0x0884ab03U, 0xfdbae38eU,
-+0xb311d35fU, 0x00000000U, 0x440ef794U, 0x86fbeafaU,
-+0x21bbac2fU, 0xf8650d21U, 0xcfae58c2U, 0xab86355aU,
-+0xa5612a93U, 0x1ef452cfU, 0xfa446167U, 0x77877afbU,
-+0x3cf3a485U, 0xa9a7591cU, 0x2d7ddfa0U, 0x72589454U,
-+0xdd9c7982U, 0x27d818e5U, 0xce336ee1U, 0x2207f64aU,
-+0x0aa5c745U, 0x55808cb1U, 0xc6b7c5e2U, 0xb4ef51b6U,
-+0x4f3606f2U, 0xdbffcd48U, 0x4955b238U, 0xbc6bfab5U,
-+0xe34eb141U, 0x118e7b25U, 0x606ab514U, 0x78fd5311U,
-+0xd518d281U, 0xe2d38762U, 0xe0f2eb24U, 0xebca1a42U,
-+0x7adc3f57U, 0xef88c2ceU, 0x6e8daaddU, 0xa3029e59U,
-+0x09199d20U, 0xe4b033a8U, 0x660901deU, 0xe70c69cdU,
-+0x980fb835U, 0x61f78337U, 0xbdf6cc96U, 0xac78b7b3U,
-+0x977591dfU, 0xc149470bU, 0xade58190U, 0x1897e605U,
-+0xbfd7a0d0U, 0xbe4a96f3U, 0xa29fa87aU, 0x4ae9e85dU,
-+0xc50b9f87U, 0x26452ec6U, 0x03bc5a65U, 0xfbd95744U,
-+0x5c991191U, 0xc496a9a4U, 0x5946ff3eU, 0x404c2f18U,
-+0x679437fdU, 0x53e3387bU, 0x8a3d9975U, 0xd0c73c2eU,
-+0x392c4a2aU, 0x5f254bf4U, 0xa123f21fU, 0x761a4cd8U,
-+0x9dd0569aU, 0x5eb87dd7U, 0x541dba92U, 0x0b38f166U,
-+0x28a2310fU, 0x8c5e2dbfU, 0x8547b09fU, 0x3214bb4cU,
-+0xeda9ae88U, 0xc850da2bU, 0x83240455U, 0xe9eb7604U,
-+0x65b55bbbU, 0x2b1e6b6aU, 0xf68212e8U, 0x9ff13adcU,
-+0xf2c0ca64U, 0xba084e7fU, 0xf4a37eaeU, 0x3035d70aU,
-+0x17edcfefU, 0x2ce0e983U, 0xb130bf19U, 0x7e9ee7dbU,
-+0x96e8a7fcU, 0x4593c1b7U, 0xa4fc1cb0U, 0x47b2adf1U,
-+0x6f109cfeU, 0xb0ad893aU, 0x13af1763U, 0x9a2ed473U,
-+0x3d6e92a6U, 0x019d3623U, 0xf9f83b02U, 0x0cc6738fU,
-+0x2ec185c5U, 0x48c8841bU, 0x5b679378U, 0x92aa7f70U,
-+0x7b410974U, 0x8dc31b9cU, 0xca71b66dU, 0x908b1336U,
-+0x41d1193bU, 0x9554fd99U, 0xafc4edd6U, 0x527e0e58U,
-+0x743b209eU, 0x4c8a5c97U, 0x43f0757dU, 0xae59dbf5U,
-+0xb6ce3df0U, 0xb7530bd3U, 0x190ad026U, 0xb8292239U,
- };
- static const u32 Te2[256] = {
--0x509bb3e2U, 0xca0663b4U, 0xa2d485e4U, 0x4602216cU,
--0x3fa83a6fU, 0xbd75a616U, 0x0610134dU, 0xb99c4d60U,
--0xb44d176aU, 0xf98e7f41U, 0xda8fe277U, 0x08c9cdecU,
--0x0dd15a0aU, 0x79aa1b03U, 0x4bd37b66U, 0xf757a1e0U,
--0x5b5afaa5U, 0xa535ea39U, 0x7773c5a2U, 0x0938b17cU,
--0xe7de2023U, 0x28c0d471U, 0x01f17c90U, 0xbe7d22bdU,
--0x4ecbec80U, 0x7682b932U, 0xc4dfbd15U, 0xba94c9cbU,
--0xe4d6a488U, 0xa1dc014fU, 0x32796065U, 0xe907fe82U,
--0x7e4b74deU, 0x2931a8e1U, 0xb25d0427U, 0x68d2e650U,
--0x6f33898dU, 0x1699928eU, 0xa7cc1202U, 0xea0f7a29U,
--0xcbf71f24U, 0x80246442U, 0xf6a6dd70U, 0x3ca0bec4U,
--0x8be52d05U, 0xedee15f4U, 0x61ea572cU, 0x33881cf5U,
--0xa325f974U, 0xd5a74046U, 0x601b2bbcU, 0x0ed9dea1U,
--0x8c0442d8U, 0x84cd8f34U, 0x1e505f62U, 0x492a835dU,
--0x6ec2f51dU, 0xd2462f9bU, 0x9d7cbf8bU, 0x1768ee1eU,
--0xff9e6c0cU, 0x15911625U, 0x53933749U, 0xe62f5cb3U,
--0x2c293f07U, 0x52624bd9U, 0x13810568U, 0x4f3a9010U,
--0xf87f03d1U, 0x726b5244U, 0x891cd53eU, 0x69239ac0U,
--0x8a145195U, 0xeee6915fU, 0xaf05dfeeU, 0x127079f8U,
--0xc33ed2c8U, 0xc7d739beU, 0x27e87640U, 0xaa1d4808U,
--0x516acf72U, 0x0c20269aU, 0xd14eab30U, 0x3d51c254U,
--0x8634770fU, 0x568ba0afU, 0xadfc27d5U, 0xe03f4ffeU,
--0x1ab9b414U, 0x7cb28ce5U, 0xc1c72af3U, 0x1d58dbc9U,
--0x7163d6efU, 0xd4563cd6U, 0xac0d5b45U, 0x8df53e48U,
--0x40123221U, 0x22f0e1a6U, 0xc8ff9b8fU, 0x2dd84397U,
--0xa915cca3U, 0x9864286dU, 0xb86d31f0U, 0xabec3498U,
--0x34697328U, 0x07e16fddU, 0x4dc3682bU, 0xd98766dcU,
--0xc0365663U, 0x6bda62fbU, 0x5cbb9578U, 0xc90ee71fU,
--0x95b57267U, 0xe337cb55U, 0x47f35dfcU, 0xcc1670f9U,
--0x431ab68aU, 0x108981c3U, 0x3171e4ceU, 0x6c3b0d26U,
--0x9b6cacc6U, 0x3080985eU, 0xbc84da86U, 0x5e426d43U,
--0xec1f6964U, 0xebfe06b9U, 0x030884abU, 0x8efdbae3U,
--0x5fb311d3U, 0x00000000U, 0x94440ef7U, 0xfa86fbeaU,
--0x2f21bbacU, 0x21f8650dU, 0xc2cfae58U, 0x5aab8635U,
--0x93a5612aU, 0xcf1ef452U, 0x67fa4461U, 0xfb77877aU,
--0x853cf3a4U, 0x1ca9a759U, 0xa02d7ddfU, 0x54725894U,
--0x82dd9c79U, 0xe527d818U, 0xe1ce336eU, 0x4a2207f6U,
--0x450aa5c7U, 0xb155808cU, 0xe2c6b7c5U, 0xb6b4ef51U,
--0xf24f3606U, 0x48dbffcdU, 0x384955b2U, 0xb5bc6bfaU,
--0x41e34eb1U, 0x25118e7bU, 0x14606ab5U, 0x1178fd53U,
--0x81d518d2U, 0x62e2d387U, 0x24e0f2ebU, 0x42ebca1aU,
--0x577adc3fU, 0xceef88c2U, 0xdd6e8daaU, 0x59a3029eU,
--0x2009199dU, 0xa8e4b033U, 0xde660901U, 0xcde70c69U,
--0x35980fb8U, 0x3761f783U, 0x96bdf6ccU, 0xb3ac78b7U,
--0xdf977591U, 0x0bc14947U, 0x90ade581U, 0x051897e6U,
--0xd0bfd7a0U, 0xf3be4a96U, 0x7aa29fa8U, 0x5d4ae9e8U,
--0x87c50b9fU, 0xc626452eU, 0x6503bc5aU, 0x44fbd957U,
--0x915c9911U, 0xa4c496a9U, 0x3e5946ffU, 0x18404c2fU,
--0xfd679437U, 0x7b53e338U, 0x758a3d99U, 0x2ed0c73cU,
--0x2a392c4aU, 0xf45f254bU, 0x1fa123f2U, 0xd8761a4cU,
--0x9a9dd056U, 0xd75eb87dU, 0x92541dbaU, 0x660b38f1U,
--0x0f28a231U, 0xbf8c5e2dU, 0x9f8547b0U, 0x4c3214bbU,
--0x88eda9aeU, 0x2bc850daU, 0x55832404U, 0x04e9eb76U,
--0xbb65b55bU, 0x6a2b1e6bU, 0xe8f68212U, 0xdc9ff13aU,
--0x64f2c0caU, 0x7fba084eU, 0xaef4a37eU, 0x0a3035d7U,
--0xef17edcfU, 0x832ce0e9U, 0x19b130bfU, 0xdb7e9ee7U,
--0xfc96e8a7U, 0xb74593c1U, 0xb0a4fc1cU, 0xf147b2adU,
--0xfe6f109cU, 0x3ab0ad89U, 0x6313af17U, 0x739a2ed4U,
--0xa63d6e92U, 0x23019d36U, 0x02f9f83bU, 0x8f0cc673U,
--0xc52ec185U, 0x1b48c884U, 0x785b6793U, 0x7092aa7fU,
--0x747b4109U, 0x9c8dc31bU, 0x6dca71b6U, 0x36908b13U,
--0x3b41d119U, 0x999554fdU, 0xd6afc4edU, 0x58527e0eU,
--0x9e743b20U, 0x974c8a5cU, 0x7d43f075U, 0xf5ae59dbU,
--0xf0b6ce3dU, 0xd3b7530bU, 0x26190ad0U, 0x39b82922U,
-+0x509bb3e2U, 0xca0663b4U, 0xa2d485e4U, 0x4602216cU,
-+0x3fa83a6fU, 0xbd75a616U, 0x0610134dU, 0xb99c4d60U,
-+0xb44d176aU, 0xf98e7f41U, 0xda8fe277U, 0x08c9cdecU,
-+0x0dd15a0aU, 0x79aa1b03U, 0x4bd37b66U, 0xf757a1e0U,
-+0x5b5afaa5U, 0xa535ea39U, 0x7773c5a2U, 0x0938b17cU,
-+0xe7de2023U, 0x28c0d471U, 0x01f17c90U, 0xbe7d22bdU,
-+0x4ecbec80U, 0x7682b932U, 0xc4dfbd15U, 0xba94c9cbU,
-+0xe4d6a488U, 0xa1dc014fU, 0x32796065U, 0xe907fe82U,
-+0x7e4b74deU, 0x2931a8e1U, 0xb25d0427U, 0x68d2e650U,
-+0x6f33898dU, 0x1699928eU, 0xa7cc1202U, 0xea0f7a29U,
-+0xcbf71f24U, 0x80246442U, 0xf6a6dd70U, 0x3ca0bec4U,
-+0x8be52d05U, 0xedee15f4U, 0x61ea572cU, 0x33881cf5U,
-+0xa325f974U, 0xd5a74046U, 0x601b2bbcU, 0x0ed9dea1U,
-+0x8c0442d8U, 0x84cd8f34U, 0x1e505f62U, 0x492a835dU,
-+0x6ec2f51dU, 0xd2462f9bU, 0x9d7cbf8bU, 0x1768ee1eU,
-+0xff9e6c0cU, 0x15911625U, 0x53933749U, 0xe62f5cb3U,
-+0x2c293f07U, 0x52624bd9U, 0x13810568U, 0x4f3a9010U,
-+0xf87f03d1U, 0x726b5244U, 0x891cd53eU, 0x69239ac0U,
-+0x8a145195U, 0xeee6915fU, 0xaf05dfeeU, 0x127079f8U,
-+0xc33ed2c8U, 0xc7d739beU, 0x27e87640U, 0xaa1d4808U,
-+0x516acf72U, 0x0c20269aU, 0xd14eab30U, 0x3d51c254U,
-+0x8634770fU, 0x568ba0afU, 0xadfc27d5U, 0xe03f4ffeU,
-+0x1ab9b414U, 0x7cb28ce5U, 0xc1c72af3U, 0x1d58dbc9U,
-+0x7163d6efU, 0xd4563cd6U, 0xac0d5b45U, 0x8df53e48U,
-+0x40123221U, 0x22f0e1a6U, 0xc8ff9b8fU, 0x2dd84397U,
-+0xa915cca3U, 0x9864286dU, 0xb86d31f0U, 0xabec3498U,
-+0x34697328U, 0x07e16fddU, 0x4dc3682bU, 0xd98766dcU,
-+0xc0365663U, 0x6bda62fbU, 0x5cbb9578U, 0xc90ee71fU,
-+0x95b57267U, 0xe337cb55U, 0x47f35dfcU, 0xcc1670f9U,
-+0x431ab68aU, 0x108981c3U, 0x3171e4ceU, 0x6c3b0d26U,
-+0x9b6cacc6U, 0x3080985eU, 0xbc84da86U, 0x5e426d43U,
-+0xec1f6964U, 0xebfe06b9U, 0x030884abU, 0x8efdbae3U,
-+0x5fb311d3U, 0x00000000U, 0x94440ef7U, 0xfa86fbeaU,
-+0x2f21bbacU, 0x21f8650dU, 0xc2cfae58U, 0x5aab8635U,
-+0x93a5612aU, 0xcf1ef452U, 0x67fa4461U, 0xfb77877aU,
-+0x853cf3a4U, 0x1ca9a759U, 0xa02d7ddfU, 0x54725894U,
-+0x82dd9c79U, 0xe527d818U, 0xe1ce336eU, 0x4a2207f6U,
-+0x450aa5c7U, 0xb155808cU, 0xe2c6b7c5U, 0xb6b4ef51U,
-+0xf24f3606U, 0x48dbffcdU, 0x384955b2U, 0xb5bc6bfaU,
-+0x41e34eb1U, 0x25118e7bU, 0x14606ab5U, 0x1178fd53U,
-+0x81d518d2U, 0x62e2d387U, 0x24e0f2ebU, 0x42ebca1aU,
-+0x577adc3fU, 0xceef88c2U, 0xdd6e8daaU, 0x59a3029eU,
-+0x2009199dU, 0xa8e4b033U, 0xde660901U, 0xcde70c69U,
-+0x35980fb8U, 0x3761f783U, 0x96bdf6ccU, 0xb3ac78b7U,
-+0xdf977591U, 0x0bc14947U, 0x90ade581U, 0x051897e6U,
-+0xd0bfd7a0U, 0xf3be4a96U, 0x7aa29fa8U, 0x5d4ae9e8U,
-+0x87c50b9fU, 0xc626452eU, 0x6503bc5aU, 0x44fbd957U,
-+0x915c9911U, 0xa4c496a9U, 0x3e5946ffU, 0x18404c2fU,
-+0xfd679437U, 0x7b53e338U, 0x758a3d99U, 0x2ed0c73cU,
-+0x2a392c4aU, 0xf45f254bU, 0x1fa123f2U, 0xd8761a4cU,
-+0x9a9dd056U, 0xd75eb87dU, 0x92541dbaU, 0x660b38f1U,
-+0x0f28a231U, 0xbf8c5e2dU, 0x9f8547b0U, 0x4c3214bbU,
-+0x88eda9aeU, 0x2bc850daU, 0x55832404U, 0x04e9eb76U,
-+0xbb65b55bU, 0x6a2b1e6bU, 0xe8f68212U, 0xdc9ff13aU,
-+0x64f2c0caU, 0x7fba084eU, 0xaef4a37eU, 0x0a3035d7U,
-+0xef17edcfU, 0x832ce0e9U, 0x19b130bfU, 0xdb7e9ee7U,
-+0xfc96e8a7U, 0xb74593c1U, 0xb0a4fc1cU, 0xf147b2adU,
-+0xfe6f109cU, 0x3ab0ad89U, 0x6313af17U, 0x739a2ed4U,
-+0xa63d6e92U, 0x23019d36U, 0x02f9f83bU, 0x8f0cc673U,
-+0xc52ec185U, 0x1b48c884U, 0x785b6793U, 0x7092aa7fU,
-+0x747b4109U, 0x9c8dc31bU, 0x6dca71b6U, 0x36908b13U,
-+0x3b41d119U, 0x999554fdU, 0xd6afc4edU, 0x58527e0eU,
-+0x9e743b20U, 0x974c8a5cU, 0x7d43f075U, 0xf5ae59dbU,
-+0xf0b6ce3dU, 0xd3b7530bU, 0x26190ad0U, 0x39b82922U,
- };
- static const u32 Te3[256] = {
--0xe2509bb3U, 0xb4ca0663U, 0xe4a2d485U, 0x6c460221U,
--0x6f3fa83aU, 0x16bd75a6U, 0x4d061013U, 0x60b99c4dU,
--0x6ab44d17U, 0x41f98e7fU, 0x77da8fe2U, 0xec08c9cdU,
--0x0a0dd15aU, 0x0379aa1bU, 0x664bd37bU, 0xe0f757a1U,
--0xa55b5afaU, 0x39a535eaU, 0xa27773c5U, 0x7c0938b1U,
--0x23e7de20U, 0x7128c0d4U, 0x9001f17cU, 0xbdbe7d22U,
--0x804ecbecU, 0x327682b9U, 0x15c4dfbdU, 0xcbba94c9U,
--0x88e4d6a4U, 0x4fa1dc01U, 0x65327960U, 0x82e907feU,
--0xde7e4b74U, 0xe12931a8U, 0x27b25d04U, 0x5068d2e6U,
--0x8d6f3389U, 0x8e169992U, 0x02a7cc12U, 0x29ea0f7aU,
--0x24cbf71fU, 0x42802464U, 0x70f6a6ddU, 0xc43ca0beU,
--0x058be52dU, 0xf4edee15U, 0x2c61ea57U, 0xf533881cU,
--0x74a325f9U, 0x46d5a740U, 0xbc601b2bU, 0xa10ed9deU,
--0xd88c0442U, 0x3484cd8fU, 0x621e505fU, 0x5d492a83U,
--0x1d6ec2f5U, 0x9bd2462fU, 0x8b9d7cbfU, 0x1e1768eeU,
--0x0cff9e6cU, 0x25159116U, 0x49539337U, 0xb3e62f5cU,
--0x072c293fU, 0xd952624bU, 0x68138105U, 0x104f3a90U,
--0xd1f87f03U, 0x44726b52U, 0x3e891cd5U, 0xc069239aU,
--0x958a1451U, 0x5feee691U, 0xeeaf05dfU, 0xf8127079U,
--0xc8c33ed2U, 0xbec7d739U, 0x4027e876U, 0x08aa1d48U,
--0x72516acfU, 0x9a0c2026U, 0x30d14eabU, 0x543d51c2U,
--0x0f863477U, 0xaf568ba0U, 0xd5adfc27U, 0xfee03f4fU,
--0x141ab9b4U, 0xe57cb28cU, 0xf3c1c72aU, 0xc91d58dbU,
--0xef7163d6U, 0xd6d4563cU, 0x45ac0d5bU, 0x488df53eU,
--0x21401232U, 0xa622f0e1U, 0x8fc8ff9bU, 0x972dd843U,
--0xa3a915ccU, 0x6d986428U, 0xf0b86d31U, 0x98abec34U,
--0x28346973U, 0xdd07e16fU, 0x2b4dc368U, 0xdcd98766U,
--0x63c03656U, 0xfb6bda62U, 0x785cbb95U, 0x1fc90ee7U,
--0x6795b572U, 0x55e337cbU, 0xfc47f35dU, 0xf9cc1670U,
--0x8a431ab6U, 0xc3108981U, 0xce3171e4U, 0x266c3b0dU,
--0xc69b6cacU, 0x5e308098U, 0x86bc84daU, 0x435e426dU,
--0x64ec1f69U, 0xb9ebfe06U, 0xab030884U, 0xe38efdbaU,
--0xd35fb311U, 0x00000000U, 0xf794440eU, 0xeafa86fbU,
--0xac2f21bbU, 0x0d21f865U, 0x58c2cfaeU, 0x355aab86U,
--0x2a93a561U, 0x52cf1ef4U, 0x6167fa44U, 0x7afb7787U,
--0xa4853cf3U, 0x591ca9a7U, 0xdfa02d7dU, 0x94547258U,
--0x7982dd9cU, 0x18e527d8U, 0x6ee1ce33U, 0xf64a2207U,
--0xc7450aa5U, 0x8cb15580U, 0xc5e2c6b7U, 0x51b6b4efU,
--0x06f24f36U, 0xcd48dbffU, 0xb2384955U, 0xfab5bc6bU,
--0xb141e34eU, 0x7b25118eU, 0xb514606aU, 0x531178fdU,
--0xd281d518U, 0x8762e2d3U, 0xeb24e0f2U, 0x1a42ebcaU,
--0x3f577adcU, 0xc2ceef88U, 0xaadd6e8dU, 0x9e59a302U,
--0x9d200919U, 0x33a8e4b0U, 0x01de6609U, 0x69cde70cU,
--0xb835980fU, 0x833761f7U, 0xcc96bdf6U, 0xb7b3ac78U,
--0x91df9775U, 0x470bc149U, 0x8190ade5U, 0xe6051897U,
--0xa0d0bfd7U, 0x96f3be4aU, 0xa87aa29fU, 0xe85d4ae9U,
--0x9f87c50bU, 0x2ec62645U, 0x5a6503bcU, 0x5744fbd9U,
--0x11915c99U, 0xa9a4c496U, 0xff3e5946U, 0x2f18404cU,
--0x37fd6794U, 0x387b53e3U, 0x99758a3dU, 0x3c2ed0c7U,
--0x4a2a392cU, 0x4bf45f25U, 0xf21fa123U, 0x4cd8761aU,
--0x569a9dd0U, 0x7dd75eb8U, 0xba92541dU, 0xf1660b38U,
--0x310f28a2U, 0x2dbf8c5eU, 0xb09f8547U, 0xbb4c3214U,
--0xae88eda9U, 0xda2bc850U, 0x04558324U, 0x7604e9ebU,
--0x5bbb65b5U, 0x6b6a2b1eU, 0x12e8f682U, 0x3adc9ff1U,
--0xca64f2c0U, 0x4e7fba08U, 0x7eaef4a3U, 0xd70a3035U,
--0xcfef17edU, 0xe9832ce0U, 0xbf19b130U, 0xe7db7e9eU,
--0xa7fc96e8U, 0xc1b74593U, 0x1cb0a4fcU, 0xadf147b2U,
--0x9cfe6f10U, 0x893ab0adU, 0x176313afU, 0xd4739a2eU,
--0x92a63d6eU, 0x3623019dU, 0x3b02f9f8U, 0x738f0cc6U,
--0x85c52ec1U, 0x841b48c8U, 0x93785b67U, 0x7f7092aaU,
--0x09747b41U, 0x1b9c8dc3U, 0xb66dca71U, 0x1336908bU,
--0x193b41d1U, 0xfd999554U, 0xedd6afc4U, 0x0e58527eU,
--0x209e743bU, 0x5c974c8aU, 0x757d43f0U, 0xdbf5ae59U,
--0x3df0b6ceU, 0x0bd3b753U, 0xd026190aU, 0x2239b829U,
-+0xe2509bb3U, 0xb4ca0663U, 0xe4a2d485U, 0x6c460221U,
-+0x6f3fa83aU, 0x16bd75a6U, 0x4d061013U, 0x60b99c4dU,
-+0x6ab44d17U, 0x41f98e7fU, 0x77da8fe2U, 0xec08c9cdU,
-+0x0a0dd15aU, 0x0379aa1bU, 0x664bd37bU, 0xe0f757a1U,
-+0xa55b5afaU, 0x39a535eaU, 0xa27773c5U, 0x7c0938b1U,
-+0x23e7de20U, 0x7128c0d4U, 0x9001f17cU, 0xbdbe7d22U,
-+0x804ecbecU, 0x327682b9U, 0x15c4dfbdU, 0xcbba94c9U,
-+0x88e4d6a4U, 0x4fa1dc01U, 0x65327960U, 0x82e907feU,
-+0xde7e4b74U, 0xe12931a8U, 0x27b25d04U, 0x5068d2e6U,
-+0x8d6f3389U, 0x8e169992U, 0x02a7cc12U, 0x29ea0f7aU,
-+0x24cbf71fU, 0x42802464U, 0x70f6a6ddU, 0xc43ca0beU,
-+0x058be52dU, 0xf4edee15U, 0x2c61ea57U, 0xf533881cU,
-+0x74a325f9U, 0x46d5a740U, 0xbc601b2bU, 0xa10ed9deU,
-+0xd88c0442U, 0x3484cd8fU, 0x621e505fU, 0x5d492a83U,
-+0x1d6ec2f5U, 0x9bd2462fU, 0x8b9d7cbfU, 0x1e1768eeU,
-+0x0cff9e6cU, 0x25159116U, 0x49539337U, 0xb3e62f5cU,
-+0x072c293fU, 0xd952624bU, 0x68138105U, 0x104f3a90U,
-+0xd1f87f03U, 0x44726b52U, 0x3e891cd5U, 0xc069239aU,
-+0x958a1451U, 0x5feee691U, 0xeeaf05dfU, 0xf8127079U,
-+0xc8c33ed2U, 0xbec7d739U, 0x4027e876U, 0x08aa1d48U,
-+0x72516acfU, 0x9a0c2026U, 0x30d14eabU, 0x543d51c2U,
-+0x0f863477U, 0xaf568ba0U, 0xd5adfc27U, 0xfee03f4fU,
-+0x141ab9b4U, 0xe57cb28cU, 0xf3c1c72aU, 0xc91d58dbU,
-+0xef7163d6U, 0xd6d4563cU, 0x45ac0d5bU, 0x488df53eU,
-+0x21401232U, 0xa622f0e1U, 0x8fc8ff9bU, 0x972dd843U,
-+0xa3a915ccU, 0x6d986428U, 0xf0b86d31U, 0x98abec34U,
-+0x28346973U, 0xdd07e16fU, 0x2b4dc368U, 0xdcd98766U,
-+0x63c03656U, 0xfb6bda62U, 0x785cbb95U, 0x1fc90ee7U,
-+0x6795b572U, 0x55e337cbU, 0xfc47f35dU, 0xf9cc1670U,
-+0x8a431ab6U, 0xc3108981U, 0xce3171e4U, 0x266c3b0dU,
-+0xc69b6cacU, 0x5e308098U, 0x86bc84daU, 0x435e426dU,
-+0x64ec1f69U, 0xb9ebfe06U, 0xab030884U, 0xe38efdbaU,
-+0xd35fb311U, 0x00000000U, 0xf794440eU, 0xeafa86fbU,
-+0xac2f21bbU, 0x0d21f865U, 0x58c2cfaeU, 0x355aab86U,
-+0x2a93a561U, 0x52cf1ef4U, 0x6167fa44U, 0x7afb7787U,
-+0xa4853cf3U, 0x591ca9a7U, 0xdfa02d7dU, 0x94547258U,
-+0x7982dd9cU, 0x18e527d8U, 0x6ee1ce33U, 0xf64a2207U,
-+0xc7450aa5U, 0x8cb15580U, 0xc5e2c6b7U, 0x51b6b4efU,
-+0x06f24f36U, 0xcd48dbffU, 0xb2384955U, 0xfab5bc6bU,
-+0xb141e34eU, 0x7b25118eU, 0xb514606aU, 0x531178fdU,
-+0xd281d518U, 0x8762e2d3U, 0xeb24e0f2U, 0x1a42ebcaU,
-+0x3f577adcU, 0xc2ceef88U, 0xaadd6e8dU, 0x9e59a302U,
-+0x9d200919U, 0x33a8e4b0U, 0x01de6609U, 0x69cde70cU,
-+0xb835980fU, 0x833761f7U, 0xcc96bdf6U, 0xb7b3ac78U,
-+0x91df9775U, 0x470bc149U, 0x8190ade5U, 0xe6051897U,
-+0xa0d0bfd7U, 0x96f3be4aU, 0xa87aa29fU, 0xe85d4ae9U,
-+0x9f87c50bU, 0x2ec62645U, 0x5a6503bcU, 0x5744fbd9U,
-+0x11915c99U, 0xa9a4c496U, 0xff3e5946U, 0x2f18404cU,
-+0x37fd6794U, 0x387b53e3U, 0x99758a3dU, 0x3c2ed0c7U,
-+0x4a2a392cU, 0x4bf45f25U, 0xf21fa123U, 0x4cd8761aU,
-+0x569a9dd0U, 0x7dd75eb8U, 0xba92541dU, 0xf1660b38U,
-+0x310f28a2U, 0x2dbf8c5eU, 0xb09f8547U, 0xbb4c3214U,
-+0xae88eda9U, 0xda2bc850U, 0x04558324U, 0x7604e9ebU,
-+0x5bbb65b5U, 0x6b6a2b1eU, 0x12e8f682U, 0x3adc9ff1U,
-+0xca64f2c0U, 0x4e7fba08U, 0x7eaef4a3U, 0xd70a3035U,
-+0xcfef17edU, 0xe9832ce0U, 0xbf19b130U, 0xe7db7e9eU,
-+0xa7fc96e8U, 0xc1b74593U, 0x1cb0a4fcU, 0xadf147b2U,
-+0x9cfe6f10U, 0x893ab0adU, 0x176313afU, 0xd4739a2eU,
-+0x92a63d6eU, 0x3623019dU, 0x3b02f9f8U, 0x738f0cc6U,
-+0x85c52ec1U, 0x841b48c8U, 0x93785b67U, 0x7f7092aaU,
-+0x09747b41U, 0x1b9c8dc3U, 0xb66dca71U, 0x1336908bU,
-+0x193b41d1U, 0xfd999554U, 0xedd6afc4U, 0x0e58527eU,
-+0x209e743bU, 0x5c974c8aU, 0x757d43f0U, 0xdbf5ae59U,
-+0x3df0b6ceU, 0x0bd3b753U, 0xd026190aU, 0x2239b829U,
- };
- static const u32 Te4[256] = {
--0x18181818U, 0x23232323U, 0xc6c6c6c6U, 0xe8e8e8e8U,
--0x87878787U, 0xb8b8b8b8U, 0x01010101U, 0x4f4f4f4fU,
--0x36363636U, 0xa6a6a6a6U, 0xd2d2d2d2U, 0xf5f5f5f5U,
--0x79797979U, 0x6f6f6f6fU, 0x91919191U, 0x52525252U,
--0x60606060U, 0xbcbcbcbcU, 0x9b9b9b9bU, 0x8e8e8e8eU,
--0xa3a3a3a3U, 0x0c0c0c0cU, 0x7b7b7b7bU, 0x35353535U,
--0x1d1d1d1dU, 0xe0e0e0e0U, 0xd7d7d7d7U, 0xc2c2c2c2U,
--0x2e2e2e2eU, 0x4b4b4b4bU, 0xfefefefeU, 0x57575757U,
--0x15151515U, 0x77777777U, 0x37373737U, 0xe5e5e5e5U,
--0x9f9f9f9fU, 0xf0f0f0f0U, 0x4a4a4a4aU, 0xdadadadaU,
--0x58585858U, 0xc9c9c9c9U, 0x29292929U, 0x0a0a0a0aU,
--0xb1b1b1b1U, 0xa0a0a0a0U, 0x6b6b6b6bU, 0x85858585U,
--0xbdbdbdbdU, 0x5d5d5d5dU, 0x10101010U, 0xf4f4f4f4U,
--0xcbcbcbcbU, 0x3e3e3e3eU, 0x05050505U, 0x67676767U,
--0xe4e4e4e4U, 0x27272727U, 0x41414141U, 0x8b8b8b8bU,
--0xa7a7a7a7U, 0x7d7d7d7dU, 0x95959595U, 0xd8d8d8d8U,
--0xfbfbfbfbU, 0xeeeeeeeeU, 0x7c7c7c7cU, 0x66666666U,
--0xddddddddU, 0x17171717U, 0x47474747U, 0x9e9e9e9eU,
--0xcacacacaU, 0x2d2d2d2dU, 0xbfbfbfbfU, 0x07070707U,
--0xadadadadU, 0x5a5a5a5aU, 0x83838383U, 0x33333333U,
--0x63636363U, 0x02020202U, 0xaaaaaaaaU, 0x71717171U,
--0xc8c8c8c8U, 0x19191919U, 0x49494949U, 0xd9d9d9d9U,
--0xf2f2f2f2U, 0xe3e3e3e3U, 0x5b5b5b5bU, 0x88888888U,
--0x9a9a9a9aU, 0x26262626U, 0x32323232U, 0xb0b0b0b0U,
--0xe9e9e9e9U, 0x0f0f0f0fU, 0xd5d5d5d5U, 0x80808080U,
--0xbebebebeU, 0xcdcdcdcdU, 0x34343434U, 0x48484848U,
--0xffffffffU, 0x7a7a7a7aU, 0x90909090U, 0x5f5f5f5fU,
--0x20202020U, 0x68686868U, 0x1a1a1a1aU, 0xaeaeaeaeU,
--0xb4b4b4b4U, 0x54545454U, 0x93939393U, 0x22222222U,
--0x64646464U, 0xf1f1f1f1U, 0x73737373U, 0x12121212U,
--0x40404040U, 0x08080808U, 0xc3c3c3c3U, 0xececececU,
--0xdbdbdbdbU, 0xa1a1a1a1U, 0x8d8d8d8dU, 0x3d3d3d3dU,
--0x97979797U, 0x00000000U, 0xcfcfcfcfU, 0x2b2b2b2bU,
--0x76767676U, 0x82828282U, 0xd6d6d6d6U, 0x1b1b1b1bU,
--0xb5b5b5b5U, 0xafafafafU, 0x6a6a6a6aU, 0x50505050U,
--0x45454545U, 0xf3f3f3f3U, 0x30303030U, 0xefefefefU,
--0x3f3f3f3fU, 0x55555555U, 0xa2a2a2a2U, 0xeaeaeaeaU,
--0x65656565U, 0xbabababaU, 0x2f2f2f2fU, 0xc0c0c0c0U,
--0xdedededeU, 0x1c1c1c1cU, 0xfdfdfdfdU, 0x4d4d4d4dU,
--0x92929292U, 0x75757575U, 0x06060606U, 0x8a8a8a8aU,
--0xb2b2b2b2U, 0xe6e6e6e6U, 0x0e0e0e0eU, 0x1f1f1f1fU,
--0x62626262U, 0xd4d4d4d4U, 0xa8a8a8a8U, 0x96969696U,
--0xf9f9f9f9U, 0xc5c5c5c5U, 0x25252525U, 0x59595959U,
--0x84848484U, 0x72727272U, 0x39393939U, 0x4c4c4c4cU,
--0x5e5e5e5eU, 0x78787878U, 0x38383838U, 0x8c8c8c8cU,
--0xd1d1d1d1U, 0xa5a5a5a5U, 0xe2e2e2e2U, 0x61616161U,
--0xb3b3b3b3U, 0x21212121U, 0x9c9c9c9cU, 0x1e1e1e1eU,
--0x43434343U, 0xc7c7c7c7U, 0xfcfcfcfcU, 0x04040404U,
--0x51515151U, 0x99999999U, 0x6d6d6d6dU, 0x0d0d0d0dU,
--0xfafafafaU, 0xdfdfdfdfU, 0x7e7e7e7eU, 0x24242424U,
--0x3b3b3b3bU, 0xababababU, 0xcecececeU, 0x11111111U,
--0x8f8f8f8fU, 0x4e4e4e4eU, 0xb7b7b7b7U, 0xebebebebU,
--0x3c3c3c3cU, 0x81818181U, 0x94949494U, 0xf7f7f7f7U,
--0xb9b9b9b9U, 0x13131313U, 0x2c2c2c2cU, 0xd3d3d3d3U,
--0xe7e7e7e7U, 0x6e6e6e6eU, 0xc4c4c4c4U, 0x03030303U,
--0x56565656U, 0x44444444U, 0x7f7f7f7fU, 0xa9a9a9a9U,
--0x2a2a2a2aU, 0xbbbbbbbbU, 0xc1c1c1c1U, 0x53535353U,
--0xdcdcdcdcU, 0x0b0b0b0bU, 0x9d9d9d9dU, 0x6c6c6c6cU,
--0x31313131U, 0x74747474U, 0xf6f6f6f6U, 0x46464646U,
--0xacacacacU, 0x89898989U, 0x14141414U, 0xe1e1e1e1U,
--0x16161616U, 0x3a3a3a3aU, 0x69696969U, 0x09090909U,
--0x70707070U, 0xb6b6b6b6U, 0xd0d0d0d0U, 0xededededU,
--0xccccccccU, 0x42424242U, 0x98989898U, 0xa4a4a4a4U,
--0x28282828U, 0x5c5c5c5cU, 0xf8f8f8f8U, 0x86868686U,
-+0x18181818U, 0x23232323U, 0xc6c6c6c6U, 0xe8e8e8e8U,
-+0x87878787U, 0xb8b8b8b8U, 0x01010101U, 0x4f4f4f4fU,
-+0x36363636U, 0xa6a6a6a6U, 0xd2d2d2d2U, 0xf5f5f5f5U,
-+0x79797979U, 0x6f6f6f6fU, 0x91919191U, 0x52525252U,
-+0x60606060U, 0xbcbcbcbcU, 0x9b9b9b9bU, 0x8e8e8e8eU,
-+0xa3a3a3a3U, 0x0c0c0c0cU, 0x7b7b7b7bU, 0x35353535U,
-+0x1d1d1d1dU, 0xe0e0e0e0U, 0xd7d7d7d7U, 0xc2c2c2c2U,
-+0x2e2e2e2eU, 0x4b4b4b4bU, 0xfefefefeU, 0x57575757U,
-+0x15151515U, 0x77777777U, 0x37373737U, 0xe5e5e5e5U,
-+0x9f9f9f9fU, 0xf0f0f0f0U, 0x4a4a4a4aU, 0xdadadadaU,
-+0x58585858U, 0xc9c9c9c9U, 0x29292929U, 0x0a0a0a0aU,
-+0xb1b1b1b1U, 0xa0a0a0a0U, 0x6b6b6b6bU, 0x85858585U,
-+0xbdbdbdbdU, 0x5d5d5d5dU, 0x10101010U, 0xf4f4f4f4U,
-+0xcbcbcbcbU, 0x3e3e3e3eU, 0x05050505U, 0x67676767U,
-+0xe4e4e4e4U, 0x27272727U, 0x41414141U, 0x8b8b8b8bU,
-+0xa7a7a7a7U, 0x7d7d7d7dU, 0x95959595U, 0xd8d8d8d8U,
-+0xfbfbfbfbU, 0xeeeeeeeeU, 0x7c7c7c7cU, 0x66666666U,
-+0xddddddddU, 0x17171717U, 0x47474747U, 0x9e9e9e9eU,
-+0xcacacacaU, 0x2d2d2d2dU, 0xbfbfbfbfU, 0x07070707U,
-+0xadadadadU, 0x5a5a5a5aU, 0x83838383U, 0x33333333U,
-+0x63636363U, 0x02020202U, 0xaaaaaaaaU, 0x71717171U,
-+0xc8c8c8c8U, 0x19191919U, 0x49494949U, 0xd9d9d9d9U,
-+0xf2f2f2f2U, 0xe3e3e3e3U, 0x5b5b5b5bU, 0x88888888U,
-+0x9a9a9a9aU, 0x26262626U, 0x32323232U, 0xb0b0b0b0U,
-+0xe9e9e9e9U, 0x0f0f0f0fU, 0xd5d5d5d5U, 0x80808080U,
-+0xbebebebeU, 0xcdcdcdcdU, 0x34343434U, 0x48484848U,
-+0xffffffffU, 0x7a7a7a7aU, 0x90909090U, 0x5f5f5f5fU,
-+0x20202020U, 0x68686868U, 0x1a1a1a1aU, 0xaeaeaeaeU,
-+0xb4b4b4b4U, 0x54545454U, 0x93939393U, 0x22222222U,
-+0x64646464U, 0xf1f1f1f1U, 0x73737373U, 0x12121212U,
-+0x40404040U, 0x08080808U, 0xc3c3c3c3U, 0xececececU,
-+0xdbdbdbdbU, 0xa1a1a1a1U, 0x8d8d8d8dU, 0x3d3d3d3dU,
-+0x97979797U, 0x00000000U, 0xcfcfcfcfU, 0x2b2b2b2bU,
-+0x76767676U, 0x82828282U, 0xd6d6d6d6U, 0x1b1b1b1bU,
-+0xb5b5b5b5U, 0xafafafafU, 0x6a6a6a6aU, 0x50505050U,
-+0x45454545U, 0xf3f3f3f3U, 0x30303030U, 0xefefefefU,
-+0x3f3f3f3fU, 0x55555555U, 0xa2a2a2a2U, 0xeaeaeaeaU,
-+0x65656565U, 0xbabababaU, 0x2f2f2f2fU, 0xc0c0c0c0U,
-+0xdedededeU, 0x1c1c1c1cU, 0xfdfdfdfdU, 0x4d4d4d4dU,
-+0x92929292U, 0x75757575U, 0x06060606U, 0x8a8a8a8aU,
-+0xb2b2b2b2U, 0xe6e6e6e6U, 0x0e0e0e0eU, 0x1f1f1f1fU,
-+0x62626262U, 0xd4d4d4d4U, 0xa8a8a8a8U, 0x96969696U,
-+0xf9f9f9f9U, 0xc5c5c5c5U, 0x25252525U, 0x59595959U,
-+0x84848484U, 0x72727272U, 0x39393939U, 0x4c4c4c4cU,
-+0x5e5e5e5eU, 0x78787878U, 0x38383838U, 0x8c8c8c8cU,
-+0xd1d1d1d1U, 0xa5a5a5a5U, 0xe2e2e2e2U, 0x61616161U,
-+0xb3b3b3b3U, 0x21212121U, 0x9c9c9c9cU, 0x1e1e1e1eU,
-+0x43434343U, 0xc7c7c7c7U, 0xfcfcfcfcU, 0x04040404U,
-+0x51515151U, 0x99999999U, 0x6d6d6d6dU, 0x0d0d0d0dU,
-+0xfafafafaU, 0xdfdfdfdfU, 0x7e7e7e7eU, 0x24242424U,
-+0x3b3b3b3bU, 0xababababU, 0xcecececeU, 0x11111111U,
-+0x8f8f8f8fU, 0x4e4e4e4eU, 0xb7b7b7b7U, 0xebebebebU,
-+0x3c3c3c3cU, 0x81818181U, 0x94949494U, 0xf7f7f7f7U,
-+0xb9b9b9b9U, 0x13131313U, 0x2c2c2c2cU, 0xd3d3d3d3U,
-+0xe7e7e7e7U, 0x6e6e6e6eU, 0xc4c4c4c4U, 0x03030303U,
-+0x56565656U, 0x44444444U, 0x7f7f7f7fU, 0xa9a9a9a9U,
-+0x2a2a2a2aU, 0xbbbbbbbbU, 0xc1c1c1c1U, 0x53535353U,
-+0xdcdcdcdcU, 0x0b0b0b0bU, 0x9d9d9d9dU, 0x6c6c6c6cU,
-+0x31313131U, 0x74747474U, 0xf6f6f6f6U, 0x46464646U,
-+0xacacacacU, 0x89898989U, 0x14141414U, 0xe1e1e1e1U,
-+0x16161616U, 0x3a3a3a3aU, 0x69696969U, 0x09090909U,
-+0x70707070U, 0xb6b6b6b6U, 0xd0d0d0d0U, 0xededededU,
-+0xccccccccU, 0x42424242U, 0x98989898U, 0xa4a4a4a4U,
-+0x28282828U, 0x5c5c5c5cU, 0xf8f8f8f8U, 0x86868686U,
- };
diff --git a/package/maradns/patches/patch-server_Makefile b/package/maradns/patches/patch-server_Makefile
deleted file mode 100644
index 571fba3eb..000000000
--- a/package/maradns/patches/patch-server_Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
---- maradns-1.4.05.orig/server/Makefile 2006-01-02 17:59:33.000000000 +0100
-+++ maradns-1.4.05/server/Makefile 2011-01-21 16:45:45.307408698 +0100
-@@ -1,11 +1,13 @@
--SOBJECTS=MaraBigHash.o recursive.o timestamp.o read_kvars.o MaraAnyChain.o
-+SOBJECTS=MaraBigHash.o recursive.o timestamp.o read_kvars.o MaraAnyChain.o \
-+ udpsuccess.o
- JOBJS=../libs/JsStr.o ../libs/JsStrOS.o ../libs/JsStrCP.o
- MHOBJS=../libs/MaraHash.o
- MJOBJS=../qual/qual_timestamp.o
-+POBJ6=../parse/Csv2_rr_wks.o
- POBJ5=../parse/Csv2_database.o ../parse/Csv2_rr_txt.o ../parse/Csv2_esc_txt.o
- POBJ3=../parse/Csv2_rr_soa.o ../parse/Csv2_rr_aaaa.o ../parse/Csv2_rr_a.o
- POBJ2=../parse/Csv2_read.o ../parse/Csv2_main.o ../parse/Csv2_parse.o $(POBJ3)
--POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2)
-+POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2) $(POBJ6)
- POBJECTS=../parse/ParseMaraRc.o ../parse/ParseCsv1.o $(POBJ4) $(POBJ5)
- DOBJECTS=../dns/Queries.o ../dns/Compress.o ../dns/bobbit.o ../dns/Decompress.o
- ROBJECTS=../rng/rng-api-fst.o ../rng/rng-alg-fst.o
-@@ -32,23 +34,26 @@ libs/tests:
- cd libs ; make
-
- read_kvars.o: read_kvars.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o read_kvars.o read_kvars.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o read_kvars.o read_kvars.c
-
- MaraBigHash.o: MaraBigHash.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h MaraBigHash_locale.h
-- $(CC) -c $(FLAGS) -o MaraBigHash.o MaraBigHash.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o MaraBigHash.o MaraBigHash.c
-
- recursive.o: recursive.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o recursive.o recursive.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o recursive.o recursive.c
-
- timestamp.o: timestamp.c MaraDNS_locale.h
-- $(CC) -c $(FLAGS) -o timestamp.o timestamp.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o timestamp.o timestamp.c
-
- MaraAnyChain.o: MaraAnyChain.c
-- $(CC) -c $(FLAGS) -o MaraAnyChain.o MaraAnyChain.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o MaraAnyChain.o MaraAnyChain.c
-+
-+udpsuccess.o: udpsuccess.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o udpsuccess.o udpsuccess.c
-
- maradns: MaraDNS.c $(OBJECTS) MaraDNS_locale.h
-- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o maradns MaraDNS.c $(OBJECTS) -lpthread
-+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o maradns MaraDNS.c $(OBJECTS) -lpthread
-
- simple: simple.c $(XOBJECTS) MaraDNS_locale.h
-- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o simple $(OBJECTS) simple.c
-+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o simple $(OBJECTS) simple.c
-
diff --git a/package/maradns/patches/patch-server_Makefile_recursive b/package/maradns/patches/patch-server_Makefile_recursive
deleted file mode 100644
index cb0d5268c..000000000
--- a/package/maradns/patches/patch-server_Makefile_recursive
+++ /dev/null
@@ -1,37 +0,0 @@
---- maradns-1.4.05.orig/server/Makefile.recursive 2007-08-16 15:35:43.000000000 +0200
-+++ maradns-1.4.05/server/Makefile.recursive 2011-01-21 16:45:30.748658697 +0100
-@@ -34,26 +34,26 @@ libs/tests:
- cd libs ; make
-
- read_kvars.o: read_kvars.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o read_kvars.o read_kvars.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o read_kvars.o read_kvars.c
-
- MaraBigHash.o: MaraBigHash.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h MaraBigHash_locale.h
-- $(CC) -c $(FLAGS) -o MaraBigHash.o MaraBigHash.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o MaraBigHash.o MaraBigHash.c
-
- recursive.o: recursive.c ../libs/JsStr.h ../libs/MaraHash.h ../MaraDns.h
-- $(CC) -c $(FLAGS) -o recursive.o recursive.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o recursive.o recursive.c
-
- timestamp.o: timestamp.c MaraDNS_locale.h
-- $(CC) -c $(FLAGS) -o timestamp.o timestamp.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o timestamp.o timestamp.c
-
- MaraAnyChain.o: MaraAnyChain.c
-- $(CC) -c $(FLAGS) -o MaraAnyChain.o MaraAnyChain.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o MaraAnyChain.o MaraAnyChain.c
-
- udpsuccess.o: udpsuccess.c
-- $(CC) -c $(FLAGS) -o udpsuccess.o udpsuccess.c
-+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o udpsuccess.o udpsuccess.c
-
- maradns: MaraDNS.c $(OBJECTS) MaraDNS_locale.h
-- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o maradns MaraDNS.c $(OBJECTS) -lpthread
-+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o maradns MaraDNS.c $(OBJECTS) -lpthread
-
- simple: simple.c $(XOBJECTS) MaraDNS_locale.h
-- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o simple $(OBJECTS) simple.c
-+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(VERSION)\" -DCOMPILED=\"$(COMPILED)\" -o simple $(OBJECTS) simple.c
-
diff --git a/package/maradns/patches/patch-tcp_Makefile b/package/maradns/patches/patch-tcp_Makefile
index 4b5d12cd4..8bd3778b8 100644
--- a/package/maradns/patches/patch-tcp_Makefile
+++ b/package/maradns/patches/patch-tcp_Makefile
@@ -1,39 +1,20 @@
---- maradns-1.4.05.orig/tcp/Makefile 2005-12-20 11:10:40.000000000 +0100
-+++ maradns-1.4.05/tcp/Makefile 2011-01-21 16:41:10.254914344 +0100
-@@ -2,10 +2,11 @@ JOBJS=../libs/JsStr.o ../libs/JsStrOS.o
- MJOBJS=../qual/qual_timestamp.o
- MHOBJS=../libs/MaraHash.o
- DOBJECTS=../dns/Queries.o ../dns/Compress.o ../dns/bobbit.o ../dns/Decompress.o
-+POBJ6=../parse/Csv2_rr_wks.o
- POBJ5=../parse/Csv2_database.o ../parse/Csv2_rr_txt.o ../parse/Csv2_esc_txt.o
- POBJ3=../parse/Csv2_rr_soa.o ../parse/Csv2_rr_aaaa.o ../parse/Csv2_rr_a.o
- POBJ2=../parse/Csv2_read.o ../parse/Csv2_main.o ../parse/Csv2_parse.o $(POBJ3)
--POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2)
-+POBJ4=../parse/ParseIpAcl.o ../parse/Parse_ipv6.o $(POBJ2) $(POBJ6)
- POBJECTS=../parse/ParseMaraRc.o ../parse/ParseCsv1.o $(POBJ4) $(POBJ5)
- OBJECTS=../parse/ParseCsv1.o ../parse/ParseMaraRc.o ../parse/ParseIpAcl.o
- SOBJECTS=../server/timestamp.o ../server/MaraBigHash.o ../server/read_kvars.o \
-@@ -16,7 +17,7 @@ OBJECTS=$(JOBJS) $(MHOBJS) $(MJOBJS) $(D
- $(TCPOBJS)
- EXECS=getzone zoneserver fetchzone
-
--FLAGS = -g -Wall $(DEBUG)
-+#FLAGS = -g -Wall $(DEBUG)
- #FLAGS = -g $(DEBUG)
-
- all: $(EXECS)
-@@ -25,11 +26,11 @@ clean:
+ - pass CFLAGS manually to CC calls, since using the $(M)
+ from top-level Makefile would lead to double CFLAGS passing
+ in implicit rules
+--- maradns-2.0.09.orig/tcp/Makefile 2010-09-09 22:21:09.000000000 +0200
++++ maradns-2.0.09/tcp/Makefile 2014-06-19 02:57:49.658775453 +0200
+@@ -25,11 +25,11 @@ clean:
rm -f core $(EXECS) $(TCPOBJS) *.exe
getzone: getzone.c $(OBJECTS)
- $(CC) $(FLAGS) -o getzone getzone.c $(OBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o getzone getzone.c $(OBJECTS)
++ $(CC) $(CFLAGS) $(FLAGS) -o getzone getzone.c $(OBJECTS)
fetchzone: fetchzone.c $(OBJECTS)
- $(CC) $(FLAGS) -o fetchzone fetchzone.c $(OBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o fetchzone fetchzone.c $(OBJECTS)
++ $(CC) $(CFLAGS) $(FLAGS) -o fetchzone fetchzone.c $(OBJECTS)
zoneserver: zoneserver.c zoneserver_en.h $(OBJECTS)
- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
++ $(CC) $(CFLAGS) $(FLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
diff --git a/package/maradns/patches/patch-tcp_Makefile_authonly b/package/maradns/patches/patch-tcp_Makefile_authonly
new file mode 100644
index 000000000..b584b1a9e
--- /dev/null
+++ b/package/maradns/patches/patch-tcp_Makefile_authonly
@@ -0,0 +1,19 @@
+ - pass CFLAGS manually since using $(M) from top-level Makefile
+ causes passing CFLAGS twice in implicit rules
+--- maradns-2.0.09.orig/tcp/Makefile.authonly 2006-07-18 05:50:44.000000000 +0200
++++ maradns-2.0.09/tcp/Makefile.authonly 2014-06-19 03:21:59.379141091 +0200
+@@ -25,11 +25,11 @@ clean:
+ rm -f core $(EXECS) $(TCPOBJS) *.exe
+
+ getzone: getzone.c $(OBJECTS)
+- $(CC) $(FLAGS) -o getzone getzone.c $(OBJECTS)
++ $(CC) $(CFLAGS) $(FLAGS) -o getzone getzone.c $(OBJECTS)
+
+ fetchzone: fetchzone.c $(OBJECTS)
+- $(CC) $(FLAGS) -o fetchzone fetchzone.c $(OBJECTS)
++ $(CC) $(CFLAGS) $(FLAGS) -o fetchzone fetchzone.c $(OBJECTS)
+
+ zoneserver: zoneserver.c zoneserver_en.h $(OBJECTS)
+- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
++ $(CC) $(CFLAGS) $(FLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
+
diff --git a/package/maradns/patches/patch-tcp_Makefile_ipv6 b/package/maradns/patches/patch-tcp_Makefile_ipv6
new file mode 100644
index 000000000..360687355
--- /dev/null
+++ b/package/maradns/patches/patch-tcp_Makefile_ipv6
@@ -0,0 +1,20 @@
+ - pass CFLAGS manually to CC calls, since using the $(M)
+ from top-level Makefile would lead to double CFLAGS passing
+ in implicit rules
+--- maradns-2.0.09.orig/tcp/Makefile.ipv6 2010-08-29 00:46:26.000000000 +0200
++++ maradns-2.0.09/tcp/Makefile.ipv6 2014-06-30 05:22:46.144053699 +0200
+@@ -25,11 +25,11 @@ clean:
+ rm -f core $(EXECS) $(TCPOBJS) *.exe
+
+ getzone: getzone.c $(OBJECTS)
+- $(CC) $(FLAGS) -o getzone getzone.c $(OBJECTS)
++ $(CC) $(CFLAGS) $(FLAGS) -o getzone getzone.c $(OBJECTS)
+
+ fetchzone: fetchzone.c $(OBJECTS)
+- $(CC) $(FLAGS) -o fetchzone fetchzone.c $(OBJECTS)
++ $(CC) $(CFLAGS) $(FLAGS) -o fetchzone fetchzone.c $(OBJECTS)
+
+ zoneserver: zoneserver.c zoneserver_en.h $(OBJECTS)
+- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
++ $(CC) $(CFLAGS) $(FLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
+
diff --git a/package/maradns/patches/patch-tcp_Makefile_recursive b/package/maradns/patches/patch-tcp_Makefile_recursive
deleted file mode 100644
index 38a7a7047..000000000
--- a/package/maradns/patches/patch-tcp_Makefile_recursive
+++ /dev/null
@@ -1,17 +0,0 @@
---- maradns-1.4.05.orig/tcp/Makefile.recursive 2006-07-18 05:50:44.000000000 +0200
-+++ maradns-1.4.05/tcp/Makefile.recursive 2011-01-21 16:40:56.008658167 +0100
-@@ -26,11 +26,11 @@ clean:
- rm -f core $(EXECS) $(TCPOBJS) *.exe
-
- getzone: getzone.c $(OBJECTS)
-- $(CC) $(FLAGS) -o getzone getzone.c $(OBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o getzone getzone.c $(OBJECTS)
-
- fetchzone: fetchzone.c $(OBJECTS)
-- $(CC) $(FLAGS) -o fetchzone fetchzone.c $(OBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o fetchzone fetchzone.c $(OBJECTS)
-
- zoneserver: zoneserver.c zoneserver_en.h $(OBJECTS)
-- $(CC) $(FLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(VERSION)\" -o zoneserver zoneserver.c $(OBJECTS) $(RNGOBJS)
-
diff --git a/package/maradns/patches/patch-tools_Makefile_recursive b/package/maradns/patches/patch-tools_Makefile_recursive
deleted file mode 100644
index bf0f20d6f..000000000
--- a/package/maradns/patches/patch-tools_Makefile_recursive
+++ /dev/null
@@ -1,25 +0,0 @@
---- maradns-1.4.05.orig/tools/Makefile.recursive 2006-01-02 17:59:33.000000000 +0100
-+++ maradns-1.4.05/tools/Makefile.recursive 2011-01-21 16:42:58.874910569 +0100
-@@ -18,17 +18,17 @@ clean:
- rm -f core $(EXECS) *.exe
-
- askmara: askmara.c askmara_labels_en.h $(OBJECTS) $(Q) $(OUTOBJ)
-- $(CC) $(FLAGS) -o askmara askmara.c $(OBJECTS) $(Q) $(OUTOBJ)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o askmara askmara.c $(OBJECTS) $(Q) $(OUTOBJ)
-
- askmara-tcp: askmara-tcp.c askmara_labels_en.h $(OBJECTS) $(ROBJECTS) $(POBJECTS)
-- $(CC) $(FLAGS) -o askmara-tcp askmara-tcp.c $(OBJECTS) $(ROBJECTS) $(POBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o askmara-tcp askmara-tcp.c $(OBJECTS) $(ROBJECTS) $(POBJECTS)
-
- benchmark: benchmark.c askmara_labels_en.h $(OBJECTS) $(POBJECTS)
-- $(CC) $(FLAGS) -o benchmark benchmark.c $(OBJECTS) $(POBJECTS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o benchmark benchmark.c $(OBJECTS) $(POBJECTS)
-
- duende: duende.c
-- $(CC) $(FLAGS) -o duende duende.c
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o duende duende.c
-
- strip.control: strip.control.c
-- $(CC) $(FLAGS) -o strip.control strip.control.c
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o strip.control strip.control.c
-