aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2015-01-06 21:25:40 +0200
committerSergey Poznyakoff <gray@gnu.org>2015-01-06 21:25:40 +0200
commitad8c9359649fa7123efc46a98c6cec0dd44f34c8 (patch)
tree7520e988989d32f68c67fc4345d32ea688799058
parentf6e7047f4ffa82b22425c57b23005c5af9dd5b4f (diff)
downloadgamma-ad8c9359649fa7123efc46a98c6cec0dd44f34c8.tar.gz
gamma-ad8c9359649fa7123efc46a98c6cec0dd44f34c8.tar.bz2
Update for Guile 2.0
* configure.ac (AM_C_PROTOTYPES): Remove. * gint: Upgrade * modules/expat (libgamma_expat_la_CPPFLAGS): Add AM_CPPFLAGS * scripts/bootstrap: Fix deprecation warnings. (grammar): Fix definition of --parents * src/Makefile.am: Use AM_CPPFLAGS instead of INCLUDES * src/eval.c (scheme_exec_data) <result> Remove. (scheme_safe_exec_body): Return result. (gamma_safe_exec): Use scm_c_catch instead of scm_internal_lazy_catch. * src/gamma-expat.c (gamma_xml_parser_create) (make_user_data): Use scm_malloc instead of scm_gc_malloc. * src/expat.sci: Don't load (ice-9 syncase) when using Guile 2.0 * src/sql.sci: Likewise.
-rw-r--r--configure.ac3
m---------gint0
-rw-r--r--modules/expat2
-rwxr-xr-xscripts/bootstrap7
-rw-r--r--src/Makefile.am15
-rw-r--r--src/eval.c15
-rw-r--r--src/expat.sci5
-rw-r--r--src/gamma-expat.c7
-rw-r--r--src/sql.sci6
9 files changed, 32 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index d7993f0..15aeb87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
dnl This file is part of Gamma
-dnl Copyright (C) 2002, 2004, 2007, 2010 Sergey Poznyakoff
+dnl Copyright (C) 2002, 2004, 2007, 2010, 2015 Sergey Poznyakoff
dnl
dnl Gamma is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3, or (at your option)
dnl any later version.
dnl
@@ -30,13 +30,12 @@ AM_SILENT_RULES([yes])
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AM_PROG_LIBTOOL
-AM_C_PROTOTYPES
GINT_INIT(gint,[1.8])
AC_SUBST(INCLUDEPATH)
AC_MSG_CHECKING(for additional includes)
AC_ARG_WITH([include-path],
diff --git a/gint b/gint
-Subproject 4254b0590e609b82dac3d688ecb401c9eefb7e2
+Subproject fd86bf7d44b0c970771830692ae7491447ebe8b
diff --git a/modules/expat b/modules/expat
index e4f6686..4017150 100644
--- a/modules/expat
+++ b/modules/expat
@@ -41,7 +41,7 @@ eval.c
scm:
expat.sci
makefile:
expat.scm: Makefile
libgamma_expat_la_LIBADD = @LTLIBOBJS@ @GUILE_LIBS@ $(EXPAT_LIBS)
-libgamma_expat_la_CPPFLAGS = $(EXPAT_INCS)
+libgamma_expat_la_CPPFLAGS = $(AM_CPPFLAGS) $(EXPAT_INCS)
diff --git a/scripts/bootstrap b/scripts/bootstrap
index 9c37074..264d1a7 100755
--- a/scripts/bootstrap
+++ b/scripts/bootstrap
@@ -1,13 +1,13 @@
#! /bin/sh
# aside from this initial boilerplate, this is actually -*- scheme -*- code
main='(module-ref (resolve-module '\''(scripts bootstrap)) '\'main')'
exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))" "$@"
!#
;;;; This file is part of Gamma.
-;;;; Copyright (C) 2010 Sergey Poznyakoff
+;;;; Copyright (C) 2010, 2015 Sergey Poznyakoff
;;;;
;;;; Gamma 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 3, or (at your option)
;;;; any later version.
;;;;
@@ -23,13 +23,14 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))"
:use-module (ice-9 getopt-long)
:use-module (ice-9 rdelim)
:use-module (ice-9 regex)
:use-module (ice-9 popen)
:use-module (srfi srfi-1))
-(debug-enable 'debug)
+(if (= (string->number (major-version)) 1)
+ (debug-enable 'debug))
(debug-enable 'backtrace)
(define module-dir #f)
(define srcdir "src")
(define makefile "src/modules.mk")
(define modconfig-file "m4/modules.m4")
@@ -48,13 +49,13 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))"
(srcdir (value #t))
(makefile (value #t))
(modconfig-file (value #t))
(modconfig-defun (value #t))
(reconfigure (value #t))
(files-from (single-char #\T) (value #t))
- (parents (single-char #\p (value #t)))
+ (parents (single-char #\p) (value #f))
(help)))
(define (usage)
(display "usage: bootstrap [OPTIONS] [FILES...]\n")
(display "Bootstraps the Gamma module system\n")
(display "OPTIONS are (defaults shown in brackets):\n")
diff --git a/src/Makefile.am b/src/Makefile.am
index 6fc983a..c5caa7f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,8 @@
# This file is part of Gamma.
-# Copyright (C) 2002, 2007, 2010 Sergey Poznyakoff
+# Copyright (C) 2002, 2007, 2010, 2015 Sergey Poznyakoff
#
# Gamma 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 3, or (at your option)
# any later version.
#
@@ -11,21 +11,26 @@
# 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 Gamma. If not, see <http://www.gnu.org/licenses/>.
-INCLUDES =-I$(top_builddir) -I$(srcdir) -I. @INCLUDEPATH@
+AM_CPPFLAGS =\
+ -I$(top_builddir)\
+ -I$(srcdir)\
+ -I.\
+ @INCLUDEPATH@\
+ -DDATADIR=\"$(guiledir)\"
-EXTRA_DIST=
+EXTRA_DIST = modules.mk documentation.sci
EXTRA_LTLIBRARIES=
lib_LTLIBRARIES=@GAMMA_LIB_LIST@
install-data-hook: @GAMMA_INSTALL_HOOKS@
+MAINTAINERCLEANFILES=
include modules.mk
-EXTRA_DIST += modules.mk documentation.sci
sitedir=$(GUILE_SITE)/$(PACKAGE)
site_DATA=$(GAMMA_BUILT_DATA_FILES) documentation.scm
.sci.scm:
$(AM_V_GEN)m4 -DVERSION=$(VERSION) -DLIBDIR=$(libdir) \
@@ -33,13 +38,11 @@ site_DATA=$(GAMMA_BUILT_DATA_FILES) documentation.scm
DOT_X_FILES=$(GAMMA_X_FILES)
DOT_DOC_FILES=$(DOT_X_FILES:.x=.doc)
DISTCLEANFILES=$(site_DATA)
-AM_CPPFLAGS=-DDATADIR=\"$(guiledir)\"
-
SUFFIXES=
CLEANFILES=
BUILT_SOURCES=
include ../gint/gint.mk
diff --git a/src/eval.c b/src/eval.c
index cc3da50..1702ea0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,8 +1,8 @@
/* This file is part of Gamma.
- Copyright (C) 2010 Sergey Poznyakoff
+ Copyright (C) 2010, 2015 Sergey Poznyakoff
Gamma 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 3, or (at your option)
any later version.
@@ -32,38 +32,37 @@ eval_catch_handler (void *data, SCM tag, SCM throw_args)
longjmp(*(jmp_buf*)data, 1);
}
struct scheme_exec_data {
SCM (*handler) (void *data);
void *data;
- SCM result;
};
static SCM
scheme_safe_exec_body (void *data)
{
struct scheme_exec_data *ed = data;
- ed->result = ed->handler(ed->data);
- return SCM_BOOL_F;
+ return ed->handler(ed->data);
}
int
gamma_safe_exec(SCM (*handler) (void *data), void *data, SCM *result)
{
jmp_buf jmp_env;
struct scheme_exec_data ed;
+ SCM res;
if (setjmp(jmp_env))
exit(70); /* EX_SOFTWARE */
ed.handler = handler;
ed.data = data;
- scm_internal_lazy_catch(SCM_BOOL_T,
- scheme_safe_exec_body, (void*)&ed,
- eval_catch_handler, &jmp_env);
+ res = scm_c_catch(SCM_BOOL_T,
+ scheme_safe_exec_body, (void*)&ed,
+ eval_catch_handler, &jmp_env, NULL, NULL);
if (result)
- *result = ed.result;
+ *result = res;
return 0;
}
char *
gamma_proc_name(SCM proc)
{
diff --git a/src/expat.sci b/src/expat.sci
index 6f729fd..19e48fe 100644
--- a/src/expat.sci
+++ b/src/expat.sci
@@ -1,8 +1,8 @@
;;;; This file is part of Gamma. -*- scheme -*-
-;;;; Copyright (C) 2010 Sergey Poznyakoff
+;;;; Copyright (C) 2010, 2015 Sergey Poznyakoff
;;;;
;;;; Gamma 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 3, or (at your option)
;;;; any later version.
;;;;
@@ -23,13 +23,14 @@ changequote([,])dnl
:export (xml-make-parser
xml-parse-more
xml-parse
xml-set-handler)
:export-syntax (xml-error-descr))
-(use-syntax (ice-9 syncase))
+(if (= (string->number (major-version)) 1)
+ (use-syntax (ice-9 syncase)))
(let ((lib-path "LIBDIR/"))
(load-extension (string-append
lib-path "libgamma-expat-v-VERSION") "gamma_expat_init"))
(define (xml-make-parser . rest)
diff --git a/src/gamma-expat.c b/src/gamma-expat.c
index b70fe32..a81d30e 100644
--- a/src/gamma-expat.c
+++ b/src/gamma-expat.c
@@ -1,8 +1,8 @@
/* This file is part of Gamma.
- Copyright (C) 2010 Sergey Poznyakoff
+ Copyright (C) 2010, 2015 Sergey Poznyakoff
Gamma 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 3, or (at your option)
any later version.
@@ -29,13 +29,13 @@ struct gamma_xml_parser
static SCM
gamma_xml_parser_create(XML_Parser parser)
{
struct gamma_xml_parser *gp;
- gp = scm_gc_malloc(sizeof (*gp), "XML_Parser");
+ gp = scm_malloc(sizeof (*gp));
gp->parser = parser;
SCM_RETURN_NEWSMOB(gamma_xml_parser_tag, gp);
}
#define GAMMA_XML_PARSER_PTR(smob) \
((struct gamma_xml_parser *)SCM_CDR(smob))
@@ -97,14 +97,13 @@ gamma_xml_parser_init()
static struct gamma_expat_user_data *
make_user_data ()
{
int i;
- struct gamma_expat_user_data *p = scm_gc_malloc(sizeof (*p),
- "make_user_data");
+ struct gamma_expat_user_data *p = scm_malloc(sizeof (*p));
for (i = 0; i < gamma_expat_handler_count; i++)
p->handler[i] = SCM_UNSPECIFIED;
p->external_entity_ref_handler_arg = SCM_UNSPECIFIED;
return p;
}
diff --git a/src/sql.sci b/src/sql.sci
index fd23795..ab91c00 100644
--- a/src/sql.sci
+++ b/src/sql.sci
@@ -1,8 +1,8 @@
;;;; This file is part of Gamma. -*- scheme -*-
-;;;; Copyright (C) 2002, 2008, 2010 Sergey Poznyakoff
+;;;; Copyright (C) 2002, 2008, 2010, 2015 Sergey Poznyakoff
;;;;
;;;; Gamma 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 3, or (at your option)
;;;; any later version.
;;;;
@@ -16,13 +16,15 @@
changequote([,])dnl
(define-module (gamma sql)
:use-module (gamma documentation)
:export-syntax (sql-catch-failure sql-ignore-failure))
-(use-syntax (ice-9 syncase))
+
+(if (= (string->number (major-version)) 1)
+ (use-syntax (ice-9 syncase)))
(let ((lib-path "LIBDIR/"))
(load-extension (string-append
lib-path "libgamma-sql-v-VERSION") "sql_init"))
(define-syntax sql-catch-failure

Return to:

Send suggestions and report system problems to the System administrator.