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,3 +1,3 @@
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
@@ -35,3 +35,2 @@ AC_PROG_LN_S
AM_PROG_LIBTOOL
-AM_C_PROTOTYPES
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
@@ -46,2 +46,2 @@ 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
@@ -6,3 +6,3 @@ 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
;;;;
@@ -28,3 +28,4 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))"
-(debug-enable 'debug)
+(if (= (string->number (major-version)) 1)
+ (debug-enable 'debug))
(debug-enable 'backtrace)
@@ -53,3 +54,3 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))"
(files-from (single-char #\T) (value #t))
- (parents (single-char #\p (value #t)))
+ (parents (single-char #\p) (value #f))
(help)))
diff --git a/src/Makefile.am b/src/Makefile.am
index 6fc983a..c5caa7f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,3 @@
# This file is part of Gamma.
-# Copyright (C) 2002, 2007, 2010 Sergey Poznyakoff
+# Copyright (C) 2002, 2007, 2010, 2015 Sergey Poznyakoff
#
@@ -16,5 +16,10 @@
-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=
@@ -22,5 +27,5 @@ lib_LTLIBRARIES=@GAMMA_LIB_LIST@
install-data-hook: @GAMMA_INSTALL_HOOKS@
+MAINTAINERCLEANFILES=
include modules.mk
-EXTRA_DIST += modules.mk documentation.sci
@@ -38,4 +43,2 @@ DISTCLEANFILES=$(site_DATA)
-AM_CPPFLAGS=-DDATADIR=\"$(guiledir)\"
-
SUFFIXES=
diff --git a/src/eval.c b/src/eval.c
index cc3da50..1702ea0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,3 +1,3 @@
/* This file is part of Gamma.
- Copyright (C) 2010 Sergey Poznyakoff
+ Copyright (C) 2010, 2015 Sergey Poznyakoff
@@ -37,3 +37,2 @@ struct scheme_exec_data {
void *data;
- SCM result;
};
@@ -44,4 +43,3 @@ 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);
}
@@ -53,2 +51,3 @@ gamma_safe_exec(SCM (*handler) (void *data), void *data, SCM *result)
struct scheme_exec_data ed;
+ SCM res;
@@ -58,7 +57,7 @@ gamma_safe_exec(SCM (*handler) (void *data), void *data, SCM *result)
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;
diff --git a/src/expat.sci b/src/expat.sci
index 6f729fd..19e48fe 100644
--- a/src/expat.sci
+++ b/src/expat.sci
@@ -1,3 +1,3 @@
;;;; This file is part of Gamma. -*- scheme -*-
-;;;; Copyright (C) 2010 Sergey Poznyakoff
+;;;; Copyright (C) 2010, 2015 Sergey Poznyakoff
;;;;
@@ -28,3 +28,4 @@ changequote([,])dnl
-(use-syntax (ice-9 syncase))
+(if (= (string->number (major-version)) 1)
+ (use-syntax (ice-9 syncase)))
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,3 +1,3 @@
/* This file is part of Gamma.
- Copyright (C) 2010 Sergey Poznyakoff
+ Copyright (C) 2010, 2015 Sergey Poznyakoff
@@ -34,3 +34,3 @@ gamma_xml_parser_create(XML_Parser parser)
- gp = scm_gc_malloc(sizeof (*gp), "XML_Parser");
+ gp = scm_malloc(sizeof (*gp));
gp->parser = parser;
@@ -102,4 +102,3 @@ make_user_data ()
- 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++)
diff --git a/src/sql.sci b/src/sql.sci
index fd23795..ab91c00 100644
--- a/src/sql.sci
+++ b/src/sql.sci
@@ -1,3 +1,3 @@
;;;; This file is part of Gamma. -*- scheme -*-
-;;;; Copyright (C) 2002, 2008, 2010 Sergey Poznyakoff
+;;;; Copyright (C) 2002, 2008, 2010, 2015 Sergey Poznyakoff
;;;;
@@ -21,3 +21,5 @@ changequote([,])dnl
:export-syntax (sql-catch-failure sql-ignore-failure))
-(use-syntax (ice-9 syncase))
+
+(if (= (string->number (major-version)) 1)
+ (use-syntax (ice-9 syncase)))

Return to:

Send suggestions and report system problems to the System administrator.