The last Guile 1.8.x release dates back to 2010.
* configure.ac: Remove 1.8 from 'GUILE_PKG'.
* doc/gnutls-guile.texi (Guile Preparations): Remove mention of Guile 1.8.
* guile/src/core.c (mark_session_record_port)
(free_session_record_port): Remove.
(scm_init_gnutls_session_record_port_type): Remove corresponding
'scm_set_port_mark' and 'scm_set_port_free' calls.
* guile/modules/gnutls.in: Remove top-level 'cond-expand' forms for
Guile 1.8.
* guile/modules/gnutls/build/tests.scm: Likewise.
* NEWS: Update.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
instead of throwing an exception, just like it would for a proper
session termination.
+** guile: Guile 1.8 is no longer supported
+
* Version 3.7.6 (released 2022-05-27)
** libgnutls: Fixed invalid write when gnutls_realloc_zero()
dnl Process this file with autoconf to produce a configure script.
-# Copyright (C) 2000-2012, 2016, 2019 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012, 2016, 2019, 2022 Free Software Foundation, Inc.
#
# Author: Nikos Mavrogiannopoulos, Simon Josefsson
#
AC_PATH_PROG([GUILD], [guild])
AC_SUBST([GUILD])
- GUILE_PKG([3.0 2.2 2.0 1.8])
+ GUILE_PKG([3.0 2.2 2.0])
GUILE_PROGS
GUILE_SITE_DIR
GUILE_FLAGS
This manual is last updated @value{UPDATED} for version
@value{VERSION} of GnuTLS.
-Copyright @copyright{} 2001-2012, 2014, 2016, 2019 Free Software Foundation, Inc.
+Copyright @copyright{} 2001-2012, 2014, 2016, 2019, 2022 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@chapter Guile Preparations
The GnuTLS Guile bindings are available for the Guile 3.0 and 2.2
-series, as well as the legacy 2.0 and even 1.8 series.
+series, as well as the legacy 2.0 series.
By default they are installed under the GnuTLS installation directory,
typically @file{/usr/local/share/guile/site/}). Normally Guile
;;; GnuTLS --- Guile bindings for GnuTLS.
-;;; Copyright (C) 2007-2012, 2014, 2015, 2016, 2019, 2021 Free Software
+;;; Copyright (C) 2007-2012, 2014, 2015, 2016, 2019, 2021-2022 Free Software
;;; Foundation, Inc.
;;;
;;; GnuTLS is free software; you can redistribute it and/or
openpgp-certificate-format/raw
openpgp-certificate-format/base64))
-(cond-expand
- ((not guile-2) ;silly 1.8
- (define-macro (eval-when foo a b)
- `(begin ,a ,b)))
- (else #t))
-
(eval-when (expand load eval)
(define %libdir
(or (getenv "GNUTLS_GUILE_EXTENSION_DIR")
"guile-gnutls-v-2")
"scm_init_gnutls")))
-(cond-expand
- ((not guile-2)
- (define-macro (define-deprecated new)
- `(define ,new ,(symbol-append '% new))))
- (else
- (define-syntax define-deprecated
- (lambda (s)
- "Define a deprecated variable or procedure, along these lines:
+(define-syntax define-deprecated
+ (lambda (s)
+ "Define a deprecated variable or procedure, along these lines:
(define-deprecated variable alias)
This defines 'variable' as an alias for 'alias', and emits a warning when
'variable' is used."
- (syntax-case s ()
- ((_ variable)
- (with-syntax ((alias (datum->syntax
- #'variable
- (symbol-append
- '% (syntax->datum #'variable)))))
- #'(define-deprecated variable alias)))
- ((_ variable alias)
- (identifier? #'variable)
- #`(define-syntax variable
- (lambda (s)
- (issue-deprecation-warning
- (format #f "GnuTLS variable '~a' is deprecated"
- (syntax->datum #'variable)))
- (syntax-case s ()
- ((_ args (... ...))
- #'(alias args (... ...)))
- (id
- (identifier? #'id)
- #'alias))))))))))
+ (syntax-case s ()
+ ((_ variable)
+ (with-syntax ((alias (datum->syntax
+ #'variable
+ (symbol-append
+ '% (syntax->datum #'variable)))))
+ #'(define-deprecated variable alias)))
+ ((_ variable alias)
+ (identifier? #'variable)
+ #`(define-syntax variable
+ (lambda (s)
+ (issue-deprecation-warning
+ (format #f "GnuTLS variable '~a' is deprecated"
+ (syntax->datum #'variable)))
+ (syntax-case s ()
+ ((_ args (... ...))
+ #'(alias args (... ...)))
+ (id
+ (identifier? #'id)
+ #'alias))))))))
;; Renaming.
;;; GnuTLS --- Guile bindings for GnuTLS.
-;;; Copyright (C) 2011-2012, 2016, 2021 Free Software Foundation, Inc.
+;;; Copyright (C) 2011-2012, 2016, 2021-2022 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
;;; Written by Ludovic Courtès <ludo@gnu.org>.
(define-module (gnutls build tests)
+ #:use-module (rnrs io ports)
+ #:use-module (rnrs bytevectors)
+ #:use-module (ice-9 match)
#:export (run-test
with-child-process))
(primitive-exit 2)))
(parent pid))))
-(cond-expand
- ((not guile-2) ;1.8, yay!
- (use-modules (ice-9 syncase))
+(define-syntax-rule (define-replacement (name args ...) body ...)
+ ;; Define a compatibility replacement for NAME, if needed.
+ (define-public name
+ (if (module-defined? the-scm-module 'name)
+ (module-ref the-scm-module 'name)
+ (lambda (args ...)
+ body ...))))
- (define-syntax define-syntax-rule
- (syntax-rules ()
- ((_ (name args ...) docstring body)
- (define-syntax name
- (syntax-rules ()
- ((_ args ...) body))))))
+;; 'uniform-vector-read!' and 'uniform-vector-write' are deprecated in 2.0
+;; and absent in 2.2.
+;; TODO: Switch to the R6RS bytevector and I/O interface.
- (export define-syntax-rule))
-
- (else ;2.0 and 2.2
- (use-modules (rnrs io ports)
- (rnrs bytevectors)
- (ice-9 match))
-
- (define-syntax-rule (define-replacement (name args ...) body ...)
- ;; Define a compatibility replacement for NAME, if needed.
- (define-public name
- (if (module-defined? the-scm-module 'name)
- (module-ref the-scm-module 'name)
- (lambda (args ...)
- body ...))))
-
- ;; 'uniform-vector-read!' and 'uniform-vector-write' are deprecated in 2.0
- ;; and absent in 2.2.
-
- (define-replacement (uniform-vector-read! buf port)
- (match (get-bytevector-n! port buf
- 0 (bytevector-length buf))
- ((? eof-object?) 0)
- ((? integer? n) n)))
-
- (define-replacement (uniform-vector-write buf port)
- (put-bytevector port buf))))
+(define-replacement (uniform-vector-read! buf port)
+ (match (get-bytevector-n! port buf
+ 0 (bytevector-length buf))
+ ((? eof-object?) 0)
+ ((? integer? n) n)))
+(define-replacement (uniform-vector-write buf port)
+ (put-bytevector port buf))
(define-syntax-rule (with-child-process pid parent child)
"Fork and evaluate expression PARENT in the current process, with PID bound
#define SCM_GNUTLS_SESSION_RECORD_PORT_BUFFER_SIZE 4096
-#if SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8
-
-/* Mark the session associated with PORT. */
-static SCM
-mark_session_record_port (SCM port)
-{
- return (SCM_GNUTLS_SESSION_RECORD_PORT_SESSION (port));
-}
-
-static size_t
-free_session_record_port (SCM port)
-#define FUNC_NAME "free_session_record_port"
-{
- SCM session;
- scm_t_port *c_port;
-
- session = SCM_GNUTLS_SESSION_RECORD_PORT_SESSION (port);
-
- /* SESSION _can_ be invalid at this point: it can be freed in the same GC
- cycle as PORT, just before PORT. Thus, we need to check whether SESSION
- still points to a session SMOB. */
- if (SCM_SMOB_PREDICATE (scm_tc16_gnutls_session, session))
- {
- /* SESSION is still valid. Disassociate PORT from SESSION. */
- gnutls_session_t c_session;
-
- c_session = scm_to_gnutls_session (session, 1, FUNC_NAME);
- SCM_GNUTLS_SET_SESSION_RECORD_PORT (c_session, SCM_BOOL_F);
- }
-
- /* Free the input buffer of PORT. */
- c_port = SCM_PTAB_ENTRY (port);
- scm_gc_free (c_port->read_buf, c_port->read_buf_size,
- session_record_port_gc_hint);
-
- return 0;
-}
-
-#undef FUNC_NAME
-
-#endif /* SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION <= 8 */
-
-
#if USING_GUILE_BEFORE_2_2
/* Data passed to `do_fill_port ()'. */
scm_set_port_read_wait_fd (session_record_port_type,
session_record_port_fd);
#endif
-
- /* 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
}
\f