]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix windows compile to compile with sldns.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Dec 2013 13:51:11 +0000 (13:51 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Dec 2013 13:51:11 +0000 (13:51 +0000)
git-svn-id: file:///svn/unbound/trunk@3024 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog
doc/README
winrc/README.txt
winrc/anchor-update.c

index dd55a8aa5939dd58d586aac4b97213f1e0436d5a..72f669044b928e40c3e42a9d09347b491feba118 100755 (executable)
--- a/configure
+++ b/configure
@@ -16955,7 +16955,7 @@ else
 #include <openssl/evp.h>
 #include <openssl/engine.h>
 #include <openssl/conf.h>
-/* routine to load gost (from ldns) */
+/* routine to load gost (from sldns) */
 int load_gost_id(void)
 {
        static int gost_id = 0;
index bc47dbf5e906877103be8083f02cb8f7e67c7c70..efc1a4a5d724143ba8c1391d61d2787dd3d5b27d 100644 (file)
@@ -614,7 +614,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <openssl/evp.h>
 #include <openssl/engine.h>
 #include <openssl/conf.h>
-/* routine to load gost (from ldns) */
+/* routine to load gost (from sldns) */
 int load_gost_id(void)
 {
        static int gost_id = 0;
index 84d1423756dd30cb284a7d62e69e4ae23c18d122..c603d606af0de96e6287161054b57c27bca8145a 100644 (file)
@@ -1,5 +1,6 @@
 3 Dec 2013: Wouter
        - Fix sldns to use sldns_ prefix for all ldns_ variables.
+       - Fix windows compile to compile with sldns.
 
 30 Nov 2013: Wouter
        - Fix sldns to make globals use sldns_ prefix.  This fixes
index a5b47cf0e01240bce1e43e038b652c372985ccc8..078b101c3a20b555e6f15370094b835752c0c005 100644 (file)
@@ -10,14 +10,11 @@ This software is under BSD license, see LICENSE for details.
        http://unbound.net/svn/
 
 * Uses the following libraries; 
-  * ldns       http://www.nlnetlabs.nl/ldns/                   (BSD license)
-    (required) can use ldns build directory directly with --with-ldns=path.
   * libevent   http://www.monkey.org/~provos/libevent/         (BSD license)
     (optional) can use builtin alternative instead.
+  * libexpat   (for the unbound-anchor helper program)         (MIT license)
 
 * Make and install: ./configure; make; make install
-  * --with-ldns=/path/to/ldns
-       It will dynamically link against it.
   * --with-libevent=/path/to/libevent
        Can be set to either the system install or the build directory.
        --with-libevent=no (default) gives a builtin alternative 
@@ -36,8 +33,8 @@ This software is under BSD license, see LICENSE for details.
        programming errors, among which buffer overflows.  The program exits
        with an error if an assertion fails (but the buffer did not overflow).
   * --enable-static-exe
-       This enables a debug option to statically link, against ldns and 
-       libevent libraries.
+       This enables a debug option to statically link against the
+       libevent library.
   * --enable-lock-checks
        This enables a debug option to check lock and unlock calls. It needs
        a recent pthreads library to work.
index dbb6d7fdc9da8fe014135ed58338da59e2031324..e40204bb0f75b227c235b36948be071cbb0d33b1 100644 (file)
@@ -43,28 +43,18 @@ Note, if your username contains a space, create a directory
 C:\msys\...\home\user to work in (click on MSYS; type: mkdir /home/user ).\r
 \r
 2. Install openssl, or compile it yourself.  http://www.openssl.org\r
-Ldns and unbound need the header files and libraries.  Static linking makes\r
+Unbounds need the header files and libraries.  Static linking makes\r
 things easier.  This is an open source library for cryptographic functions.\r
+And libexpat is needed.\r
 \r
-3. Compile LDNS\r
-Get the source code tarball  http://nlnetlabs.nl/ldns\r
-Move it into the C:\msys\...\home\user directory.\r
-Double click on the MSYS icon and give these commands\r
-$ cd /home/user\r
-$ tar xzvf ldns-xxx.tar.gz\r
-$ cd ldns-xxx\r
-$ ./configure\r
-If you compiled openssl yourself, pass --with-ssl=../openssl-xxx\r
-$ make\r
-\r
-4. Compile Unbound\r
+3. Compile Unbound\r
 Get the source code tarball  http://unbound.net\r
 Move it into the C:\msys\...\home\user directory.\r
 Double click on the MSYS icon and give these commands\r
 $ cd /home/user\r
 $ tar xzvf unbound-xxx.tar.gz\r
 $ cd unbound-xxx\r
-$ ./configure --enable-static-exe --with-ldns=../ldns-xxx\r
+$ ./configure --enable-static-exe\r
 If you compiled openssl yourself, pass --with-ssl=../openssl-xxx too.\r
 If you compiled libexpat yourself, pass --with-libexpat=../expat-install too.\r
 The configure options for libevent or threads are not applicable for \r
index 466632c2695a5cad4998d3f4d5ec67d38cafb421..e7dcabf82861d2d496bdc4a2212f6c617edbfc41 100644 (file)
@@ -79,37 +79,27 @@ do_lookup(struct ub_ctx* ctx, char* domain)
        return result;
 }
 
-/** get answer into ldns rr list */
-static sldns_rr_list*
-result2answer(struct ub_result* result)
-{
-       sldns_pkt* p = NULL;
-       sldns_rr_list* a;
-       if(sldns_wire2pkt(&p, result->answer_packet, (size_t)result->answer_len) 
-               != LDNS_STATUS_OK) 
-               return NULL;
-       a = sldns_pkt_answer(p);
-       sldns_pkt_set_answer(p, NULL);
-       sldns_pkt_free(p);
-       return a;
-}
-
 /** print result to file */
 static void
 do_print(struct ub_result* result, char* file)
 {
-       FILE* out;
-       sldns_rr_list* list = result2answer(result);
-       if(!list) fatal("result2answer failed");
-       
-       out = fopen(file, "w");
+       FILE* out = fopen(file, "w");
+       char s[65535], t[32];
+       int i;
        if(!out) {
                perror(file);
                fatal("fopen failed");
        }
-       sldns_rr_list_print(out, list);
+       i = 0;
+       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)
+               sldns_wire2str_type_buf((uint16_t)result->qtype, t, sizeof(t));
+               fprintf(out, "%s\t%s\t%s\n", result->qname, t, s);
+               i++;
+       }
        fclose(out);
-       sldns_rr_list_deep_free(list);
 }
 
 /** update domain to file */