Fix portability issues for Guile 1.8.
authorPaul Smith <psmith@gnu.org>
Mon, 30 Sep 2013 14:56:20 +0000 (10:56 -0400)
committerPaul Smith <psmith@gnu.org>
Mon, 30 Sep 2013 14:56:20 +0000 (10:56 -0400)
ChangeLog
README.W32.template
guile.c
tests/scripts/variables/GNUMAKEFLAGS

index c70cd454dc0141dd35036c6a4fdffadf9fd5e4de..4a23e13f882efbb1828aa006d18b595d35fc946a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-30  Paul Smith  <psmith@gnu.org>
+
+       * guile.c: Portability fixes for Guile 1.8.
+
 2013-09-29  Paul Smith  <psmith@gnu.org>
 
        * output.c (output_dump): Always write Enter/Leave messages to stdio.
index 3752c14d72e3ebf6ac44454484a1524893a9f681..12de42c110c1a245e5e7841dcd19e52fb16cac2b 100644 (file)
@@ -7,7 +7,7 @@ It builds with the MinGW port of GCC (tested with GCC 3.4.2).
 It also builds with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as
 with .NET 7.x and .NET 2003.
 
-As of version 3.83, a build with Guile is supported (tested with Guile
+As of version 4.0, a build with Guile is supported (tested with Guile
 2.0.3).  To build with Guile, you will need, in addition to Guile
 itself, its dependency libraries and the pkg-config program.  The
 latter is used to figure out which compilation and link switches and
diff --git a/guile.c b/guile.c
index 142c321c8b4f565f953b8e927e6a9107c02be7d3..07a21478b4baa7d34ce7f1d2178131f30902c3af 100644 (file)
--- a/guile.c
+++ b/guile.c
@@ -26,11 +26,12 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Pre-2.0 versions of Guile don't have a typedef for gsubr function types.  */
 #if SCM_MAJOR_VERSION < 2
-# define GSUBR_TYPE               SCM (*) ()
+# define GSUBR_TYPE         SCM (*) ()
 /* Guile 1.x doesn't really support i18n.  */
-# define scm_from_utf8_string(_s) (_s)
+# define EVAL_STRING(_s)    scm_c_eval_string (_s)
 #else
-# define GSUBR_TYPE     scm_t_subr
+# define GSUBR_TYPE         scm_t_subr
+# define EVAL_STRING(_s)    scm_eval_string (scm_from_utf8_string (_s))
 #endif
 
 static SCM make_mod = SCM_EOL;
@@ -109,7 +110,7 @@ guile_init (void *arg UNUSED)
 static void *
 internal_guile_eval (void *arg)
 {
-  return cvt_scm_to_str (scm_eval_string (scm_from_utf8_string (arg)));
+  return cvt_scm_to_str (EVAL_STRING (arg));
 }
 
 /* This is the function registered with make  */
index bd6979cfc3746dfcbf4c324569772593116e87ed..e9c0d55b8a47803b4d705e4a51cf086941dcfb21 100644 (file)
@@ -25,7 +25,9 @@ erR --trace --no-print-directory");
 
 # Verify that re-exec / recursion doesn't duplicate flags from GNUMAKEFLAGS
 
-$extraENV{GNUMAKEFLAGS} = '-I/tmp -Oline';
+unlink('x.mk');
+
+$extraENV{GNUMAKEFLAGS} = '-Itst/bad -Oline';
 
 run_make_test(q!
 recurse: ; @echo $@; echo MAKEFLAGS = $$MAKEFLAGS; echo GNUMAKEFLAGS = $$GNUMAKEFLAGS; #MAKEPATH# -f #MAKEFILE# all
@@ -33,7 +35,7 @@ all: ; @echo $@; echo MAKEFLAGS = $$MAKEFLAGS; echo GNUMAKEFLAGS = $$GNUMAKEFLAG
 -include x.mk
 x.mk: ; @echo $@; echo MAKEFLAGS = $$MAKEFLAGS; echo GNUMAKEFLAGS = $$GNUMAKEFLAGS; echo > $@
 !,
-              "", "x.mk\nMAKEFLAGS = -I/tmp -Oline\nGNUMAKEFLAGS =\nrecurse\nMAKEFLAGS = -I/tmp -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Entering directory '#PWD#'\nall\nMAKEFLAGS = w -I/tmp -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Leaving directory '#PWD#'\n");
+              "", "x.mk\nMAKEFLAGS = -Itst/bad -Oline\nGNUMAKEFLAGS =\nrecurse\nMAKEFLAGS = -Itst/bad -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Entering directory '#PWD#'\nall\nMAKEFLAGS = w -Itst/bad -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Leaving directory '#PWD#'\n");
 
 unlink('x.mk');