[Pkg-gnupg-commit] [libassuan] 176/437: Fix for newer Pth versions. Fix memory leak. Add convenience option for cross build to amd64

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit a4dbf919a96a453d5d8a0b66873a571e8bc5b6ae
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Nov 21 18:42:07 2006 +0000

    Fix for newer Pth versions.
    Fix memory leak.
    Add convenience option for cross build to amd64
---
 ChangeLog                | 12 ++++++++++++
 autogen.sh               | 44 ++++++++++++++++++++++++++++++++++++++++++++
 configure.ac             | 18 +++++++++++++++---
 doc/assuan.texi          |  2 +-
 m4/gnupg-pth.m4          |  2 +-
 src/ChangeLog            |  4 ++++
 src/assuan-pipe-server.c |  1 +
 7 files changed, 78 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 650435d..eedaf84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-11-21  Werner Koch  <wk at g10code.com>
+
+	* configure.ac (AH_BOTTOM): Define PTH_SYSCALL_SOFT to 0.
+	(AC_INIT): Use the SVN magic.
+
+	* m4/gnupg-pth.m4 (GNUPG_PTH_VERSION_CHECK): Use --all with
+	pth-config.
+
+2006-11-15  Werner Koch  <wk at g10code.com>
+
+	* autogen.sh: Add convenience option --build-amd64.
+
 2006-10-31  Werner Koch  <wk at g10code.com>
 
 	Released 1.0.0.
diff --git a/autogen.sh b/autogen.sh
index fca588e..2d1ee0f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -84,6 +84,50 @@ fi
 # ***** end W32 build script *******
 
 
+# ***** AMD64 cross build script *******
+# Used to cross-compile for AMD64 (for testing)
+if test "$1" = "--build-amd64"; then
+    tmp=`dirname $0`
+    tsdir=`cd "$tmp"; pwd`
+    shift
+    if [ ! -f $tsdir/config.guess ]; then
+        echo "$tsdir/config.guess not found" >&2
+        exit 1
+    fi
+    build=`$tsdir/config.guess`
+
+    [ -z "$amd64root" ] && amd64root="$HOME/amd64root"
+    echo "Using $amd64root as standard install directory" >&2
+    
+    # Locate the cross compiler
+    crossbindir=
+    for host in x86_64-linux-gnu amd64-linux-gnu; do
+        if ${host}-gcc --version >/dev/null 2>&1 ; then
+            crossbindir=/usr/${host}/bin
+            conf_CC="CC=${host}-gcc"
+            break;
+        fi
+    done
+    if [ -z "$crossbindir" ]; then
+        echo "Cross compiler kit not installed" >&2
+        echo "Stop." >&2
+        exit 1
+    fi
+   
+    if [ -f "$tsdir/config.log" ]; then
+        if ! head $tsdir/config.log | grep "$host" >/dev/null; then
+            echo "Please run a 'make distclean' first" >&2
+            exit 1
+        fi
+    fi
+
+    $tsdir/configure --enable-maintainer-mode --prefix=${amd64root}  \
+             --host=${host} --build=${build}
+    rc=$?
+    exit $rc
+fi
+# ***** end AMD64 cross build script *******
+
 
 
 # Grep the required versions from configure.ac
diff --git a/configure.ac b/configure.ac
index fdc8f05..1d738db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,9 +23,16 @@
 AC_PREREQ(2.59)
 min_automake_version="1.9.3"
 
-# Version number: Remember to change it immediately *after* a release.
-#                 Add a "-cvs" prefix for non-released code.
-AC_INIT(libassuan, 1.0.1-cvs, bug-libassuan at gnupg.org)
+# Remember to change the version number immediately *after* a release.
+# Set my_issvn to "yes" for non-released code.  Remember to run an
+# "svn up" and "autogen.sh" right before creating a distribution.
+m4_define([my_version], [1.0.1])
+m4_define([my_issvn], [yes])
+
+m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
+          || echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
+AC_INIT([libassuan], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
+        [bug-libassuan at gnupg.org])
 # Note, that this is not yet available as a shared library.
 
 PACKAGE=$PACKAGE_NAME
@@ -73,6 +80,11 @@ fi
 
 AH_BOTTOM([
 #define _ASSUAN_IN_LIBASSUAN 1
+
+/* We explicitly need to disable PTH's soft mapping as Debian
+   currently enables it by default for no reason. */
+#define PTH_SYSCALL_SOFT 0
+
 ])
 
 
diff --git a/doc/assuan.texi b/doc/assuan.texi
index 434386d..54ed7f3 100644
--- a/doc/assuan.texi
+++ b/doc/assuan.texi
@@ -886,7 +886,7 @@ client to connect to such a server, automagically sets this variable.
 @end deftypefun
 
 @noindent
-If a file descriptor has been passed a the assuan context gets initialized
+If a file descriptor has been passed, the assuan context gets initialized
 by
 
 @deftypefun assuan_error_t assuan_init_socket_server_ext (@w{assuan_context_t *@var{r_ctx}}, @w{int @var{fd}}, @w{unsigned int @var{flags}})
diff --git a/m4/gnupg-pth.m4 b/m4/gnupg-pth.m4
index 00db177..dc8e264 100644
--- a/m4/gnupg-pth.m4
+++ b/m4/gnupg-pth.m4
@@ -53,7 +53,7 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
          _gnupg_pth_save_libs=$LIBS
          CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`"
          LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`"
-         LIBS="$LIBS `$PTH_CONFIG --libs`"
+         LIBS="$LIBS `$PTH_CONFIG --libs --all`"
          AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
                                          ],
                                          [[ pth_init ();]])],
diff --git a/src/ChangeLog b/src/ChangeLog
index e651060..61b0034 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-21  Werner Koch  <wk at g10code.com>
+
+	* assuan-pipe-server.c (_assuan_release_context): Free CMDTBL.
+
 2006-11-14  Werner Koch  <wk at g10code.com>
 
 	* libassuan.m4 (AM_CHECK_LIBASSUAN): New.
diff --git a/src/assuan-pipe-server.c b/src/assuan-pipe-server.c
index a19c88e..f885161 100644
--- a/src/assuan-pipe-server.c
+++ b/src/assuan-pipe-server.c
@@ -168,6 +168,7 @@ _assuan_release_context (assuan_context_t ctx)
     {
       xfree (ctx->hello_line);
       xfree (ctx->okay_line);
+      xfree (ctx->cmdtbl);
       xfree (ctx);
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list