]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
windows compile without ldns.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Dec 2013 14:14:27 +0000 (14:14 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Dec 2013 14:14:27 +0000 (14:14 +0000)
git-svn-id: file:///svn/unbound/trunk@3029 be551aaa-1e26-0410-a405-d3ace91eadb9

makedist.sh
winrc/anchor-update.c

index d23ffe1d8452e1edaa8492d45883d3926038c7f2..dca099995a9bd8a36d8bdec0ef5d789f477a18f0 100755 (executable)
@@ -42,7 +42,7 @@ cwd=`pwd`
 # Utility functions.
 usage () {
     cat >&2 <<EOF
-Usage $0: [-h] [-s] [-d SVN_root] [-l ldns_path] [-w ...args...]
+Usage $0: [-h] [-s] [-d SVN_root] [-w ...args...]
 Generate a distribution tar file for unbound.
 
     -h           This usage information.
@@ -53,10 +53,8 @@ Generate a distribution tar file for unbound.
                  (which will then be unbound-<version>rc<number>)
     -d SVN_root  Retrieve the unbound source from the specified repository.
                  Detected from svn working copy if not specified.
-    -l ldnsdir   Directory where ldns resides. Detected from Makefile.
     -wssl openssl.xx.tar.gz Also build openssl from tarball for windows dist.
     -wxp expat.xx.tar.gz Also build expat from tarball for windows dist.
-    -wldns ldns.xx.tar.gz Also build libldns from tarball for windows dist.
     -w ...       Build windows binary dist. last args passed to configure.
 EOF
     exit 1
@@ -141,11 +139,9 @@ create_temp_dir () {
 
 SNAPSHOT="no"
 RC="no"
-LDNSDIR=""
 DOWIN="no"
 WINSSL=""
 WINEXPAT=""
-WINLDNS=""
 
 # Parse the command line arguments.
 while [ "$1" ]; do
@@ -160,10 +156,6 @@ while [ "$1" ]; do
         "-s")
             SNAPSHOT="yes"
             ;;
-        "-wldns")
-           WINLDNS="$2"
-           shift
-           ;;
         "-wssl")
            WINSSL="$2"
            shift
@@ -177,10 +169,6 @@ while [ "$1" ]; do
            shift
            break
             ;;
-        "-l")
-            LDNSDIR="$2"
-            shift
-            ;;
         "-rc")
             RC="$2"
             shift
@@ -227,21 +215,6 @@ if [ "$DOWIN" = "yes" ]; then
                cd ..
        fi
 
-       if test -n "$WINLDNS"; then
-               info "Cross compile $WINLDNS"
-               info "ldns tar unpack"
-               (cd ..; gzip -cd $WINLDNS) | tar xf - || error_cleanup "tar unpack of $WINLDNS failed"
-               cd ldns-* || error_cleanup "no ldns-X dir in tarball"
-               # we can use the cross_flag with openssl in it
-               info "ldns: Configure $cross_flag"
-               mingw32-configure  $cross_flag || error_cleanup "ldns configure failed"
-               info "ldns: make"
-               make || error_cleanup "ldns crosscompile failed"
-               # use from the build directory.
-               cross_flag="$cross_flag --with-ldns=`pwd`"
-               cd ..
-       fi
-
        if test -n "$WINEXPAT"; then
                info "Cross compile $WINEXPAT"
                info "wxp: tar unpack"
@@ -343,16 +316,6 @@ if [ "$DOWIN" = "yes" ]; then
 fi
 
 check_svn_root
-# Check if LDNSDIR is specified.
-if test -z "$LDNSDIR"; then
-    # try to autodetect from Makefile (if present)
-    if test -f Makefile; then
-         eval `grep 'ldnsdir=' Makefile`
-         if echo "$ldnsdir" | grep -v ldns-src/ >/dev/null 2>&1; then
-               LDNSDIR="$ldnsdir"
-         fi
-    fi
-fi
 
 # Start the packaging process.
 info "SVNROOT  is $SVNROOT"
@@ -382,18 +345,6 @@ flex -i -t util/configlexer.lex >> util/configlexer.c  || error_cleanup "Failed
 if test -x `which bison` 2>&1; then YACC=bison; else YACC=yacc; fi
 $YACC -y -d -o util/configparser.c util/configparser.y || error_cleanup "Failed to create configparser"
 
-# check shared code, ldns-testpkts from ldns examples, if possible.
-cd ../..
-if test ! -z "$LDNSDIR"; then
-       if diff -q $LDNSDIR/examples/ldns-testpkts.c testcode/ldns-testpkts.c &&
-          diff -q $LDNSDIR/examples/ldns-testpkts.h testcode/ldns-testpkts.h; then
-               info "ldns-testpkts.c and ldns-testpkts.h are OK"
-       else
-               info "ldns-testpkts is different in ldns and unbound"
-       fi
-fi
-cd $temp_dir/unbound
-
 find . -name .c-mode-rc.el -exec rm {} \;
 find . -name .cvsignore -exec rm {} \;
 rm makedist.sh || error_cleanup "Failed to remove makedist.sh."
index c85556d44286487eadb96e344651a35f33463192..bb454b48eef8aaab9a9ca8600a785c9dc6c8bcc7 100644 (file)
@@ -92,7 +92,8 @@ do_print(struct ub_result* result, char* file)
                fatal("fopen failed");
        }
        i = 0;
-       while(result->data[i]) {
+       if(result->havedata)
+         while(result->data[i]) {
                sldns_wire2str_rdata_buf((uint8_t*)result->data[i],
                        (size_t)result->len[i], s, sizeof(s),
                        (uint16_t)result->qtype)