[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, gnutls_2_8_x, updated. gnutls_2_8_4-7-g379e2c8
From: |
Ludovic Courtès |
Subject: |
[SCM] GNU gnutls branch, gnutls_2_8_x, updated. gnutls_2_8_4-7-g379e2c8 |
Date: |
Fri, 02 Oct 2009 07:49:00 +0000 |
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 "GNU gnutls".
http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=379e2c824bc620d8ade999b60aa44d227717ddf2
The branch, gnutls_2_8_x has been updated
via 379e2c824bc620d8ade999b60aa44d227717ddf2 (commit)
via ff34f82174c2b49018e83c934abcc44193e867a3 (commit)
via abd5fcffff4b9d7edddb946dcd2e80f771f3d9a0 (commit)
via d3d573c6724f45ff10e85407ee980be07aaf2fca (commit)
via 9a416ed50b55f1855bf4b30921bc0cf6cc73e06f (commit)
via a2e7f4fd3854c9c0ee3d15dbf4e18041bdc7bfdb (commit)
from 49367544d9b638b3e244fd08b97859c58acdd9ba (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 379e2c824bc620d8ade999b60aa44d227717ddf2
Author: Ludovic Courtès <address@hidden>
Date: Mon Sep 28 22:46:33 2009 +0200
guile: Adjust for Guile 1.9.3+.
* guile/src/core.c (mark_session_record_port, free_session_record_port):
Conditionalize on `SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8'.
(scm_init_gnutls_session_record_port_type): Adjust accordingly.
(make_session_record_port): Use `scm_gc_malloc_pointerless ()' when
available.
commit ff34f82174c2b49018e83c934abcc44193e867a3
Author: Ludovic Courtès <address@hidden>
Date: Mon Sep 28 22:40:08 2009 +0200
guile: Syntactic nitpicking.
* guile/src/core.c (SCM_GNUTLS_MAKE_SESSION_DATA,
SCM_GNUTLS_SET_SESSION_RECORD_PORT): Remove extraneous semicolon.
commit abd5fcffff4b9d7edddb946dcd2e80f771f3d9a0
Author: Ludovic Courtès <address@hidden>
Date: Mon Sep 28 22:39:03 2009 +0200
guile: Use Guile's malloc routines.
* guile/src/core.c (scm_init_gnutls): Use Guile's malloc routines.
commit d3d573c6724f45ff10e85407ee980be07aaf2fca
Author: Ludovic Courtès <address@hidden>
Date: Wed Sep 23 11:07:13 2009 +0200
Fix integer/pointer cast warnings in the Guile bindings on x86_64.
* guile/src/core.c (do_fill_port, fill_session_record_port_input,
scm_gnutls_set_session_transport_fd_x): Make sure pointer/integer casts
use integers of the right size.
commit 9a416ed50b55f1855bf4b30921bc0cf6cc73e06f
Author: Ludovic Courtès <address@hidden>
Date: Wed Sep 23 11:04:06 2009 +0200
Update Guile bindings to the current OpenPGP API.
* guile/src/extra.c (scm_gnutls_openpgp_certificate_id,
scm_gnutls_openpgp_certificate_id_x): Use
the newer `gnutls_openpgp_crt_get_key_id ()'.
commit a2e7f4fd3854c9c0ee3d15dbf4e18041bdc7bfdb
Author: Ludovic Courtès <address@hidden>
Date: Wed Sep 23 10:44:29 2009 +0200
Turn off auto-compilation when using Guile 1.9+.
* guile/src/Makefile.am (GUILE_FOR_BUILD): Turn off auto-compilation
with Guile 1.9+.
* guile/tests/Makefile.am (TESTS_ENVIRONMENT): Likewise.
* doc/Makefile.am (GUILE_FOR_BUILD): Likewise.
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 9 +++++++++
doc/Makefile.am | 4 +++-
guile/src/Makefile.am | 5 +++--
guile/src/core.c | 42 +++++++++++++++++++++++++++++++-----------
guile/src/extra.c | 4 ++--
guile/tests/Makefile.am | 6 ++++--
6 files changed, 52 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0315f3a..5c617e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,15 @@ if test "$opt_guile_bindings" = "yes"; then
gnu89_inline=yes, gnu89_inline=no)
AC_MSG_RESULT($gnu89_inline)
CFLAGS="$_gcc_cflags_save"
+
+ # Optional Guile functions.
+ save_CFLAGS="$CFLAGS"
+ save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GUILE_CFLAGS"
+ LIBS="$LIBS $GUILE_LDFLAGS"
+ AC_CHECK_FUNCS([scm_gc_malloc_pointerless])
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
else
AC_MSG_RESULT([no])
AC_MSG_WARN([A sufficiently recent GNU Guile not found. Guile
bindings not built.])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e9a4ed3..a06a263 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -156,7 +156,9 @@ if HAVE_GUILE
# Guile documentation extraction from C code.
#
-GUILE_FOR_BUILD = $(GUILE) -L $(top_srcdir)/guile/modules
+GUILE_FOR_BUILD = \
+ GUILE_AUTO_COMPILE=0 \
+ $(GUILE) -L $(top_srcdir)/guile/modules
SNARF_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
-I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes \
diff --git a/guile/src/Makefile.am b/guile/src/Makefile.am
index 7c9dbe0..2721edf 100644
--- a/guile/src/Makefile.am
+++ b/guile/src/Makefile.am
@@ -1,5 +1,5 @@
# GNUTLS -- Guile bindings for GnuTLS.
-# Copyright (C) 2007, 2008 Free Software Foundation
+# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
#
# GNUTLS is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -15,7 +15,8 @@
# License along with GNUTLS; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
-GUILE_FOR_BUILD = $(GUILE) -L $(top_srcdir)/guile/modules
+GUILE_FOR_BUILD = \
+ GUILE_AUTO_COMPILE=0 $(GUILE) -L $(top_srcdir)/guile/modules
noinst_HEADERS = errors.h utils.h
diff --git a/guile/src/core.c b/guile/src/core.c
index b7e60a9..d4884c2 100644
--- a/guile/src/core.c
+++ b/guile/src/core.c
@@ -18,6 +18,7 @@
/* Written by Ludovic Courtès <address@hidden>. */
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include <gnutls/gnutls.h>
#include <libguile.h>
@@ -55,7 +56,7 @@ const char scm_gnutls_array_error_message[] =
marked by the session mark procedure. */
#define SCM_GNUTLS_MAKE_SESSION_DATA() \
- scm_cons (SCM_BOOL_F, SCM_BOOL_F);
+ scm_cons (SCM_BOOL_F, SCM_BOOL_F)
#define SCM_GNUTLS_SET_SESSION_DATA(c_session, data) \
gnutls_session_set_ptr (c_session, (void *) SCM_UNPACK (data))
#define SCM_GNUTLS_SESSION_DATA(c_session) \
@@ -65,7 +66,7 @@ const char scm_gnutls_array_error_message[] =
SCM_SETCAR (SCM_GNUTLS_SESSION_DATA (c_session), \
scm_from_bool (c_is_fd))
#define SCM_GNUTLS_SET_SESSION_RECORD_PORT(c_session, port) \
- SCM_SETCDR (SCM_GNUTLS_SESSION_DATA (c_session), port);
+ SCM_SETCDR (SCM_GNUTLS_SESSION_DATA (c_session), port)
#define SCM_GNUTLS_SESSION_TRANSPORT_IS_FD(c_session) \
scm_to_bool (SCM_CAR (SCM_GNUTLS_SESSION_DATA (c_session)))
@@ -715,6 +716,9 @@ static scm_t_bits session_record_port_type;
static const char session_record_port_gc_hint[] =
"gnutls-session-record-port";
+
+#if SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8
+
/* Mark the session associated with PORT. */
static SCM
mark_session_record_port (SCM port)
@@ -750,9 +754,11 @@ free_session_record_port (SCM port)
return 0;
}
-
#undef FUNC_NAME
+#endif /* SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8 */
+
+
/* Data passed to `do_fill_port ()'. */
typedef struct
{
@@ -783,7 +789,7 @@ do_fill_port (void *data)
else
scm_gnutls_error (result, "fill_session_record_port_input");
- return ((void *) chr);
+ return ((void *) (uintptr_t) chr);
}
/* Fill in the input buffer of PORT. */
@@ -809,11 +815,11 @@ fill_session_record_port_input (SCM port)
if (SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session))
/* SESSION's underlying transport is a raw file descriptor, so we
must leave "Guile mode" to allow the GC to run. */
- chr = (int) scm_without_guile (do_fill_port, &c_args);
+ chr = (intptr_t) scm_without_guile (do_fill_port, &c_args);
else
/* SESSION's underlying transport is a port, so don't leave "Guile
mode". */
- chr = (int) do_fill_port (&c_args);
+ chr = (intptr_t) do_fill_port (&c_args);
}
else
chr = (int) *c_port->read_pos;
@@ -860,7 +866,12 @@ make_session_record_port (SCM session)
c_port_buf =
(unsigned char *)
- scm_gc_malloc (SCM_GNUTLS_SESSION_RECORD_PORT_BUFFER_SIZE,
+#ifdef HAVE_SCM_GC_MALLOC_POINTERLESS
+ scm_gc_malloc_pointerless
+#else
+ scm_gc_malloc
+#endif
+ (SCM_GNUTLS_SESSION_RECORD_PORT_BUFFER_SIZE,
session_record_port_gc_hint);
/* Create a new port. */
@@ -916,8 +927,14 @@ scm_init_gnutls_session_record_port_type (void)
scm_make_port_type ("gnutls-session-port",
fill_session_record_port_input,
write_to_session_record_port);
+
+ /* Guile >= 1.9.3 doesn't need a custom mark procedure, and doesn't need a
+ finalizer (since memory associated with the port is automatically
+ reclaimed.) */
+#if SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8
scm_set_port_mark (session_record_port_type, mark_session_record_port);
scm_set_port_free (session_record_port_type, free_session_record_port);
+#endif
}
@@ -935,7 +952,7 @@ SCM_DEFINE (scm_gnutls_set_session_transport_fd_x,
c_session = scm_to_gnutls_session (session, 1, FUNC_NAME);
c_fd = (int) scm_to_uint (fd);
- gnutls_transport_set_ptr (c_session, (gnutls_transport_ptr_t) c_fd);
+ gnutls_transport_set_ptr (c_session, (gnutls_transport_ptr_t) (intptr_t)
c_fd);
SCM_GNUTLS_SET_SESSION_TRANSPORT_IS_FD (c_session, 1);
@@ -2785,6 +2802,12 @@ scm_init_gnutls (void)
{
#include "core.x"
+ /* Use Guile's allocation routines, which will run the GC if need be. */
+ gnutls_malloc = scm_malloc;
+ gnutls_realloc = scm_realloc;
+ gnutls_secure_malloc = scm_malloc;
+ gnutls_free = free;
+
(void) gnutls_global_init ();
scm_gnutls_define_enums ();
@@ -2793,6 +2816,3 @@ scm_init_gnutls (void)
scm_init_gnutls_session_record_port_type ();
}
-
-/* arch-tag: 58420abe-0769-4684-b522-da7f32f4474c
- */
diff --git a/guile/src/extra.c b/guile/src/extra.c
index 2af48e7..949ed0b 100644
--- a/guile/src/extra.c
+++ b/guile/src/extra.c
@@ -167,7 +167,7 @@ SCM_DEFINE (scm_gnutls_openpgp_certificate_id,
"openpgp-certificate-id",
if (c_id == NULL)
scm_gnutls_error (GNUTLS_E_MEMORY_ERROR, FUNC_NAME);
- err = gnutls_openpgp_crt_get_id (c_key, c_id);
+ err = gnutls_openpgp_crt_get_key_id (c_key, c_id);
if (EXPECT_FALSE (err))
scm_gnutls_error (err, FUNC_NAME);
@@ -199,7 +199,7 @@ SCM_DEFINE (scm_gnutls_openpgp_certificate_id_x,
"openpgp-certificate-id!",
scm_misc_error (FUNC_NAME, "ID vector too small: ~A", scm_list_1 (id));
}
- err = gnutls_openpgp_crt_get_id (c_key, (unsigned char *) c_id);
+ err = gnutls_openpgp_crt_get_key_id (c_key, (unsigned char *) c_id);
scm_gnutls_release_array (&c_id_handle);
if (EXPECT_FALSE (err))
diff --git a/guile/tests/Makefile.am b/guile/tests/Makefile.am
index ce59729..ac93273 100644
--- a/guile/tests/Makefile.am
+++ b/guile/tests/Makefile.am
@@ -1,5 +1,5 @@
# GNUTLS -- Guile bindings for GnuTLS.
-# Copyright (C) 2007, 2008 Free Software Foundation
+# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
#
# GNUTLS is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -28,7 +28,9 @@ if ENABLE_SRP
TESTS += srp-base64.scm
endif
-TESTS_ENVIRONMENT = $(top_builddir)/guile/pre-inst-guile -L $(srcdir)
+TESTS_ENVIRONMENT = \
+ GUILE_AUTO_COMPILE=0 \
+ $(top_builddir)/guile/pre-inst-guile -L $(srcdir)
EXTRA_DIST = $(TESTS) openpgp-pub.asc openpgp-sec.asc \
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, gnutls_2_8_x, updated. gnutls_2_8_4-7-g379e2c8,
Ludovic Courtès <=