diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2015-01-06 21:25:40 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2015-01-06 21:25:40 +0200 |
commit | ad8c9359649fa7123efc46a98c6cec0dd44f34c8 (patch) | |
tree | 7520e988989d32f68c67fc4345d32ea688799058 | |
parent | f6e7047f4ffa82b22425c57b23005c5af9dd5b4f (diff) | |
download | gamma-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.ac | 3 | ||||
m--------- | gint | 0 | ||||
-rw-r--r-- | modules/expat | 2 | ||||
-rwxr-xr-x | scripts/bootstrap | 7 | ||||
-rw-r--r-- | src/Makefile.am | 15 | ||||
-rw-r--r-- | src/eval.c | 15 | ||||
-rw-r--r-- | src/expat.sci | 5 | ||||
-rw-r--r-- | src/gamma-expat.c | 7 | ||||
-rw-r--r-- | src/sql.sci | 6 |
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= @@ -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))) |