]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
fix set_bit (from NSEC3 sign) patch from Jan Komissar
authorWouter Wijngaards <wouter@NLnetLabs.nl>
Thu, 20 Jan 2011 08:29:55 +0000 (08:29 +0000)
committerWouter Wijngaards <wouter@NLnetLabs.nl>
Thu, 20 Jan 2011 08:29:55 +0000 (08:29 +0000)
12 files changed:
Makefile.in
drill/Makefile.in
examples/Makefile.in
test/05-nm.tpkg
test/12.unit-tests-dnssec.tpkg
test/14-drill-random.tpkg
test/14-unit-tests-base.tpkg
test/18-drill-tests1.tpkg
test/19-keygen.tpkg
test/19.unit-tests-rrtypes.tpkg
test/20-sign-zone.tpkg
util.c

index 5abb293b76d39c196d6e3a9475708e1a88e235d9..0cb2bf4cf876de7ec28319a035fc40897f36d4ae 100644 (file)
@@ -53,7 +53,18 @@ LIBTOOL              = $(libtool) --tag=CC --quiet
 INSTALL_LDNS_CONFIG = @INSTALL_LDNS_CONFIG@
 
 LINT           = splint
-LINTFLAGS      = +quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -D__u16=uint16_t -fixedformalarray
+LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list
+#-Dglob64=glob -Dglobfree64=globfree
+# compat with openssl linux edition.
+LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned"
+# compat with NetBSD
+ifeq "$(shell uname)" "NetBSD"
+LINTFLAGS+="-D__RENAME(x)=" -D_NETINET_IN_H_
+endif
+# compat with OpenBSD
+LINTFLAGS+="-Dsigset_t=long"
+# FreeBSD8
+LINTFLAGS+="-D__uint16_t=uint16_t"
 
 INSTALL = $(srcdir)/install-sh 
 
index 3b1d46c46e2d7e8e95c34a8ce315f7cd1646c8d7..7d8d3354f2cc8fbb9a5c268be2a70a2c3cc7249b 100644 (file)
@@ -24,7 +24,19 @@ COMPILE         = $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir)
 LINK            = $(CC) $(CFLAGS) $(LDFLAGS) 
 
 LINT            = splint
-LINTFLAGS       = +quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -D__signed__=signed -I../ -fixedformalarray
+LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list
+#-Dglob64=glob -Dglobfree64=globfree
+# compat with openssl linux edition.
+LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned"
+# compat with NetBSD
+ifeq "$(shell uname)" "NetBSD"
+LINTFLAGS+="-D__RENAME(x)=" -D_NETINET_IN_H_
+endif
+# compat with OpenBSD
+LINTFLAGS+="-Dsigset_t=long"
+# FreeBSD8
+LINTFLAGS+="-D__uint16_t=uint16_t"
+LINTFLAGS+=-D__signed__=signed
 
 OBJ=drill.o drill_util.o error.o root.o work.o chasetrace.o dnssec.o securetrace.o
 SRC=$(OBJ:.o=.c)
@@ -97,7 +109,7 @@ uninstall:
 
 lint:
        @for i in $(SRC) ; do \
-                $(LINT) $(LINTFLAGS) -I$(srcdir) $(srcdir)/$$i ; \
+                $(LINT) $(LINTFLAGS) $(CPPFLAGS) -I$(srcdir) $(srcdir)/$$i ; \
                 if [ $$? -ne 0 ] ; then exit 1 ; fi ; \
         done
 
index c7d7e9c6c1078578f3b8685f195a44391313404f..60102feaabfa54f0eb85f0cdd64c3b0f9a4db786 100644 (file)
@@ -29,8 +29,19 @@ LINK         = $(libtool) --tag=CC --quiet --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIB
 LINK_STATIC    = $(libtool) --tag=CC --quiet --mode=link $(CC) $(CFLAGS) -static $(LDFLAGS) $(LIBS) $(RUNTIME_PATH)
 
 LINT           = splint
-LINTFLAGS      = +quiet -weak -warnposix -unrecog -formatcode -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -D__u16=uint16_t -D__u32=uint32_t -preproc -D__signed__=signed -fixedformalarray
-
+LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list
+#-Dglob64=glob -Dglobfree64=globfree
+# compat with openssl linux edition.
+LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned"
+# compat with NetBSD
+ifeq "$(shell uname)" "NetBSD"
+LINTFLAGS+="-D__RENAME(x)=" -D_NETINET_IN_H_
+endif
+# compat with OpenBSD
+LINTFLAGS+="-Dsigset_t=long"
+# FreeBSD8
+LINTFLAGS+="-D__uint16_t=uint16_t"
+LINTFLAGS+=-D__signed__=signed
 
 HEADER         = config.h
 MAIN_SOURCES = ldns-read-zone.c \
index d012c22f45ef5f3071306a0eeee4f17e21ff269f..5c6bc998e33e975b2ed77bee294b3fd957869b0c 100644 (file)
Binary files a/test/05-nm.tpkg and b/test/05-nm.tpkg differ
index b66f7d907173e078a076345c44efd802bdd94b6d..0cfee88386131cc582fdb675482b0ff2130c9afe 100644 (file)
Binary files a/test/12.unit-tests-dnssec.tpkg and b/test/12.unit-tests-dnssec.tpkg differ
index 0c5831596462196e16ef5ff789e9f4721a00cd69..bda46849bcaf06ebf22a6c66ccc1bae3e083ed58 100644 (file)
Binary files a/test/14-drill-random.tpkg and b/test/14-drill-random.tpkg differ
index c8be6f2a79365b07108911d2217799df8b35b008..93dc15e09e5f2649a7accc628a61fa6f01aeaf34 100644 (file)
Binary files a/test/14-unit-tests-base.tpkg and b/test/14-unit-tests-base.tpkg differ
index 0aa0460f4fc246e5873d5013542501ca26db0aea..4dbbd8a373b5c93efca2d4c1569158c356edbc85 100644 (file)
Binary files a/test/18-drill-tests1.tpkg and b/test/18-drill-tests1.tpkg differ
index dce7db130827bad16b51c8f6f8a6d72f6f38f3b6..b6d372d42e0b58242dbafd39cb5ad0dfa60e9d8d 100644 (file)
Binary files a/test/19-keygen.tpkg and b/test/19-keygen.tpkg differ
index f7da73edd2606b586461d75558e77b54f65d2fda..cd0b51e8cd928f4d5badd3ba8cb4657ce0eaa30a 100644 (file)
Binary files a/test/19.unit-tests-rrtypes.tpkg and b/test/19.unit-tests-rrtypes.tpkg differ
index 7a69f8c8660c443fb66596cbdc165c46943dbc99..70823eccf96c31e1da49baa4b3e7b74105fd36f1 100644 (file)
Binary files a/test/20-sign-zone.tpkg and b/test/20-sign-zone.tpkg differ
diff --git a/util.c b/util.c
index 5870bb6edcf6747f3a11db09ac90312a7c015d04..eb24f81dbefe99db0c4b13f375ac5492538d5bdf 100644 (file)
--- a/util.c
+++ b/util.c
@@ -111,7 +111,7 @@ ldns_set_bit(uint8_t *byte, int bit_nr, bool value)
                if (value) {
                        *byte = *byte | (0x01 << bit_nr);
                } else {
-                       *byte = *byte & !(0x01 << bit_nr);
+                       *byte = *byte & ~(0x01 << bit_nr);
                }
        }
 }