[git] ADNS-g10 - branch, master, updated. adns-1.4-g10-2-13-g0e63141

by Jedi cvs at cvs.gnupg.org
Wed Apr 24 19:47:58 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ADNS migrated to autotools/libtool".

The branch, master has been updated
       via  0e63141f80e5eba46b6bb2a29cd1b93fdcdff8f7 (commit)
       via  b973cc33af488178b0bddc8e1eee23d2a8d854f4 (commit)
       via  4ed34a5f30d6da7a490c5c1db18cb41937bf76e4 (commit)
       via  a63cbe0c1fbc6592990e2938bdcd4ebe5383838e (commit)
       via  35477834e1c254d5fe1a209e60226f808d636d89 (commit)
      from  c48081176749273e402f10701c5f0d345a98464d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0e63141f80e5eba46b6bb2a29cd1b93fdcdff8f7
Author: Jedi <jedi at jedi.org>
Date:   Wed Apr 24 19:28:41 2013 +0200

    Post release version number bump.
    
    --

diff --git a/NEWS b/NEWS
index c940e18..b780a62 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Noteworthy changes in version 1.4-g10-4 (unreleased)
+----------------------------------------------------
+
+
 Noteworthy changes in version 1.4-g10-3 (2013-04-24)
 ----------------------------------------------------
 
diff --git a/configure.ac b/configure.ac
index 125d6fa..d2f9720 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ min_automake_version="1.10"
 # bump the version number immediately *after* the release and do
 # another commit and push so that the git magic is able to work.
 # See below for the LT version numbers.
-m4_define([mym4_version], [1.4-g10-3])
+m4_define([mym4_version], [1.4-g10-4])
 
 # Below is m4 magic to extract and compute the git revision number,
 # the decimalized short revision number, a beta version string and a

commit b973cc33af488178b0bddc8e1eee23d2a8d854f4
Author: Jedi <jedi at jedi.org>
Date:   Wed Apr 24 18:34:14 2013 +0200

    Release 1.4-g10-3.
    
    * configure.ac: Set LT version to C4/A3/R1.

diff --git a/ChangeLog b/ChangeLog
index 6b1af00..f651c6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-04-24  Werner Koch  <wk at gnupg.org>
 
+	Release 1.4-g10-3.
+
+	* configure.ac: Set LT version to C4/A3/R1.
+
+2013-04-24  Werner Koch  <wk at gnupg.org>
+
 	* src/w32inet.c: New.  Taken from gnulib lib/inet_ntop.c.
 	Modified for Windows only use.
 	(inet_ntop): Rename to adns__inet_ntop.
diff --git a/NEWS b/NEWS
index 49d33f6..c940e18 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,9 @@
-Noteworthy changes in version 1.4-g10-3 (unreleased)
+Noteworthy changes in version 1.4-g10-3 (2013-04-24)
 ----------------------------------------------------
 
- * Add support AAAA records.
+ * Basic support for AAAA records.
 
- *
+ * Added a privacy mode to adnslogres (options -P and -S).
 
 
 Noteworthy changes in version 1.4-g10-2 (2008-05-08)
diff --git a/configure.ac b/configure.ac
index 3db0f36..125d6fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AC_INIT([adns], [mym4_full_version], [bug-adns at g10code.com])
 # Please remember to document interface changes in the NEWS file.
 ADNS_LT_CURRENT=4
 ADNS_LT_AGE=3
-ADNS_LT_REVISION=0
+ADNS_LT_REVISION=1
 
 # If the API is changed in an incompatible way: increment this counter.
 ADNS_CONFIG_API_VERSION=1
diff --git a/src/Makefile.am b/src/Makefile.am
index a4300d5..1c6169c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,22 +1,22 @@
 # src/Makefile.am
 # Copyright (C) 2008 g10 Code GmbH
-# 
+#
 # This file is part of adns, which is
 #    Copyright (C) 1997-2000,2003,2006  Ian Jackson
 #    Copyright (C) 1999-2000,2003,2006  Tony Finch
 #    Copyright (C) 1991 Massachusetts Institute of Technology
 #  (See the file INSTALL for full details.)
-# 
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2, or (at your option)
 # any later version.
-#  
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
@@ -25,7 +25,8 @@
 # Thsi directory.  It is used by the include file.
 adnssrcdir = $(top_srcdir)/src
 
-EXTRA_DIST = adns-config.in libadns.vers libadns.def versioninfo.rc.in
+EXTRA_DIST = adns-config.in libadns.vers libadns.def versioninfo.rc.in \
+             w32support.c w32extra.c w32inet.c
 bin_SCRIPTS = adns-config
 include_HEADERS = adns.h
 lib_LTLIBRARIES = libadns.la
@@ -35,7 +36,7 @@ AM_CPPFLAGS=$(PLATFORMCPPFLAGS)
 if HAVE_LD_VERSION_SCRIPT
   adns_version_script_cmd = -Wl,--version-script=$(srcdir)/libadns.vers
 else
-  adns_version_script_cmd = 
+  adns_version_script_cmd =
 endif
 
 
@@ -66,7 +67,7 @@ adns_ldflag =
 no_undefined =
 export_symbols =
 adns_deps =
-w32src = 
+w32src =
 install-def-file:
 uninstall-def-file:
 endif !HAVE_W32_SYSTEM

commit 4ed34a5f30d6da7a490c5c1db18cb41937bf76e4
Author: Jedi <jedi at jedi.org>
Date:   Wed Apr 24 18:24:56 2013 +0200

    w32: Support AAAA support.
    
    * src/w32inet.c: New.  Taken from gnulib lib/inet_ntop.c.  Modified
    for Windows only use.
    (inet_ntop): Rename to adns__inet_ntop.
    * src/Makefile.am (w32src): Add file.
    * src/types.c (cs_in6addr) [W32]: Use adns__inet_ntop.
    --
    
    inet_ntop taken from
    gnulib commit c042abf1678115fe6ab736a1c12a83ff395ea7c4

diff --git a/ChangeLog b/ChangeLog
index 6f83fdb..6b1af00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-04-24  Werner Koch  <wk at gnupg.org>
+
+	* src/w32inet.c: New.  Taken from gnulib lib/inet_ntop.c.
+	Modified for Windows only use.
+	(inet_ntop): Rename to adns__inet_ntop.
+	* src/Makefile.am (w32src): Add file.
+	* src/types.c (cs_in6addr) [W32]: Use adns__inet_ntop.
+
 2012-05-11  Werner Koch  <wk at gnupg.org>
 
 	* src/adns.h (adns_rrtype): Add adns_r_aaaa.
diff --git a/src/Makefile.am b/src/Makefile.am
index 48b830b..a4300d5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,7 +52,7 @@ adns_res_ldflag = -Wl,.libs/versioninfo.o
 no_undefined = -no-undefined
 export_symbols = -export-symbols $(srcdir)/libadns.def
 adns_deps = $(ksba_res) libadns.def
-w32src = w32support.c w32extra.c
+w32src = w32support.c w32extra.c w32inet.c
 
 install-def-file:
 	$(INSTALL) $(srcdir)/libadns.def $(DESTDIR)$(libdir)/libadns.def
diff --git a/src/platform.h b/src/platform.h
index 60a25dd..44f1158 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -86,9 +86,12 @@ int gettimeofday (struct timeval *__restrict__ tp, void *__restrict__ tzp);
 #endif
 long int nrand48 (unsigned short int xsubi[3]);
 
-#else 
+/* w32inet.c:  */
+const char *adns__inet_ntop (int af, const void *src, char *dst, socklen_t cnt);
+
+#else
 /*
-    Generic POSIX platform. 
+    Generic POSIX platform.
  */
 
 
diff --git a/src/types.c b/src/types.c
index c30b311..07d16da 100644
--- a/src/types.c
+++ b/src/types.c
@@ -353,7 +353,11 @@ static int di_in6addr(adns_state ads,
 static adns_status cs_in6addr(vbuf *vb, const void *datap) {
   char buffer[INET6_ADDRSTRLEN];
 
+#ifdef HAVE_W32_SYSTEM
+  adns__inet_ntop (AF_INET6, datap,  buffer, sizeof buffer);
+#else
   inet_ntop (AF_INET6, datap,  buffer, sizeof buffer);
+#endif
 
   CSP_ADDSTR(buffer);
   return adns_s_ok;
diff --git a/src/w32inet.c b/src/w32inet.c
new file mode 100644
index 0000000..071fb76
--- /dev/null
+++ b/src/w32inet.c
@@ -0,0 +1,226 @@
+/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
+
+   Copyright (C) 2005-2006, 2008-2013 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+/*
+ * Copyright (c) 1996-1999 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#include "internal.h"
+
+/* #include <arpa/inet.h> */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+# define NS_IN6ADDRSZ 16
+# define NS_INT16SZ 2
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+typedef int verify_int_size[4 <= sizeof (int) ? 1 : -1];
+
+static const char *inet_ntop4 (const unsigned char *src, char *dst,
+                               socklen_t size);
+static const char *inet_ntop6 (const unsigned char *src, char *dst,
+                               socklen_t size);
+
+
+/* char *
+ * inet_ntop(af, src, dst, size)
+ *      convert a network format address to presentation format.
+ * return:
+ *      pointer to presentation format address ('dst'), or NULL (see errno).
+ * author:
+ *      Paul Vixie, 1996.
+ */
+const char *
+adns__inet_ntop (int af, const void *src,  char *dst, socklen_t cnt)
+{
+  switch (af)
+    {
+    case AF_INET:
+      return (inet_ntop4 (src, dst, cnt));
+
+    case AF_INET6:
+      return (inet_ntop6 (src, dst, cnt));
+
+    default:
+      errno = WSAEAFNOSUPPORT;
+      return (NULL);
+    }
+  /* NOTREACHED */
+}
+
+/* const char *
+ * inet_ntop4(src, dst, size)
+ *      format an IPv4 address
+ * return:
+ *      'dst' (as a const)
+ * notes:
+ *      (1) uses no statics
+ *      (2) takes a u_char* not an in_addr as input
+ * author:
+ *      Paul Vixie, 1996.
+ */
+static const char *
+inet_ntop4 (const unsigned char *src, char *dst, socklen_t size)
+{
+  char tmp[sizeof "255.255.255.255"];
+  int len;
+
+  len = sprintf (tmp, "%u.%u.%u.%u", src[0], src[1], src[2], src[3]);
+  if (len < 0)
+    return NULL;
+
+  if (len > size)
+    {
+      errno = ENOSPC;
+      return NULL;
+    }
+
+  return strcpy (dst, tmp);
+}
+
+
+/* const char *
+ * inet_ntop6(src, dst, size)
+ *      convert IPv6 binary address into presentation (printable) format
+ * author:
+ *      Paul Vixie, 1996.
+ */
+static const char *
+inet_ntop6 (const unsigned char *src, char *dst, socklen_t size)
+{
+  /*
+   * Note that int32_t and int16_t need only be "at least" large enough
+   * to contain a value of the specified size.  On some systems, like
+   * Crays, there is no such thing as an integer variable with 16 bits.
+   * Keep this in mind if you think this function should have been coded
+   * to use pointer overlays.  All the world's not a VAX.
+   */
+  char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
+  char *tp;
+  struct
+  {
+    int base, len;
+  } best, cur;
+  unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ];
+  int i;
+
+  /*
+   * Preprocess:
+   *      Copy the input (bytewise) array into a wordwise array.
+   *      Find the longest run of 0x00's in src[] for :: shorthanding.
+   */
+  memset (words, '\0', sizeof words);
+  for (i = 0; i < NS_IN6ADDRSZ; i += 2)
+    words[i / 2] = (src[i] << 8) | src[i + 1];
+  best.base = -1;
+  cur.base = -1;
+  best.len = 0;
+  cur.len = 0;
+  for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
+    {
+      if (words[i] == 0)
+        {
+          if (cur.base == -1)
+            cur.base = i, cur.len = 1;
+          else
+            cur.len++;
+        }
+      else
+        {
+          if (cur.base != -1)
+            {
+              if (best.base == -1 || cur.len > best.len)
+                best = cur;
+              cur.base = -1;
+            }
+        }
+    }
+  if (cur.base != -1)
+    {
+      if (best.base == -1 || cur.len > best.len)
+        best = cur;
+    }
+  if (best.base != -1 && best.len < 2)
+    best.base = -1;
+
+  /*
+   * Format the result.
+   */
+  tp = tmp;
+  for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
+    {
+      /* Are we inside the best run of 0x00's? */
+      if (best.base != -1 && i >= best.base && i < (best.base + best.len))
+        {
+          if (i == best.base)
+            *tp++ = ':';
+          continue;
+        }
+      /* Are we following an initial run of 0x00s or any real hex? */
+      if (i != 0)
+        *tp++ = ':';
+      /* Is this address an encapsulated IPv4? */
+      if (i == 6 && best.base == 0 &&
+          (best.len == 6 || (best.len == 5 && words[5] == 0xffff)))
+        {
+          if (!inet_ntop4 (src + 12, tp, sizeof tmp - (tp - tmp)))
+            return (NULL);
+          tp += strlen (tp);
+          break;
+        }
+      {
+        int len = sprintf (tp, "%x", words[i]);
+        if (len < 0)
+          return NULL;
+        tp += len;
+      }
+    }
+  /* Was it a trailing run of 0x00's? */
+  if (best.base != -1 && (best.base + best.len) ==
+      (NS_IN6ADDRSZ / NS_INT16SZ))
+    *tp++ = ':';
+  *tp++ = '\0';
+
+  /*
+   * Check for overflow, copy, and we're done.
+   */
+  if ((socklen_t) (tp - tmp) > size)
+    {
+      errno = ENOSPC;
+      return NULL;
+    }
+
+  return strcpy (dst, tmp);
+}

commit a63cbe0c1fbc6592990e2938bdcd4ebe5383838e
Author: Jedi <jedi at jedi.org>
Date:   Wed Apr 24 16:51:21 2013 +0200

    Add missing ChangeLog entries.
    
    --
    
    Taken from the git log.

diff --git a/ChangeLog b/ChangeLog
index 3b22165..6f83fdb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2012-05-11  Werner Koch  <wk at gnupg.org>
+
+	* src/adns.h (adns_rrtype): Add adns_r_aaaa.
+	(adns_answer): Add member in6addr.
+	* src/internal.h (adns__state): Change sortlist struct to allow
+	for v6 addresses.
+	* src/check.c (checkc_global): Fix for v6 sortlist.
+	* src/setup.c (ccf_sortlist): Mark entries as v4.
+	* src/types.c (search_sortlist): Ignore v6 addresses.
+	(pa_in6addr, search_sortlist6, dip_in6addr, di_in6addr)
+	(cs_in6addr): New.
+	(typeinfos): Add description for the AAAA record.
+
+	* src/setup.c (ccf_sortlist): Fix class A detection.
+
 2011-03-14  Werner Koch  <wk at g10code.com>
 
 	* client/adnslogres.c: Change license to GPLv3.

commit 35477834e1c254d5fe1a209e60226f808d636d89
Author: Jedi <jedi at jedi.org>
Date:   Wed Apr 24 16:49:10 2013 +0200

    w32: Switch to i686-w64-mingw32 as default compiler.
    
    --
    
    Also fix VPATH builds.

diff --git a/autogen.sh b/autogen.sh
index 2ce32bc..55608a7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -52,7 +52,7 @@ if test "$1" = "--build-w32"; then
     echo "Using $w32root as standard install directory" >&2
 
     crossbindir=
-    for host in i586-mingw32msvc i386-mingw32msvc i686-w64-mingw32 mingw32; do
+    for host in i686-w64-mingw32 i586-mingw32msvc i386-mingw32msvc mingw32; do
         if ${host}-gcc --version >/dev/null 2>&1 ; then
             crossbindir=/usr/${host}/bin
             conf_CC="CC=${host}-gcc"
@@ -75,7 +75,7 @@ if test "$1" = "--build-w32"; then
         fi
     fi
 
-    ./configure --enable-maintainer-mode  --prefix=${w32root}  \
+    $tsdir/configure --enable-maintainer-mode  --prefix=${w32root}  \
             --host=${host} --build=${build}
 
     exit $?

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |   29 +++++++
 NEWS            |   10 ++-
 autogen.sh      |    4 +-
 configure.ac    |    4 +-
 src/Makefile.am |   17 ++--
 src/platform.h  |    7 +-
 src/types.c     |    4 +
 src/w32inet.c   |  226 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 284 insertions(+), 17 deletions(-)
 create mode 100644 src/w32inet.c


hooks/post-receive
-- 
ADNS migrated to autotools/libtool
http://git.gnupg.org




More information about the Gnupg-commits mailing list