From f0dbd360dae88473bfe5d98d0b76ea48973e014f Mon Sep 17 00:00:00 2001 From: "Michael R. Blair" Date: Fri, 2 Jun 2006 07:00:07 +0000 Subject: [PATCH] For backward compatibility, if new `call-with-output-string' is not defined, try using the old `with-string-output-port' name instead. In short, 7.7 defines a backward-compatible package alias but 7.6 does not define a forward-compatible anticipatory alias (obviously). This is needed when, say, building 7.7 CVS sources using release 7.6 installed binaries as a bootstrap Scheme: the new "makegen.scm" uses the new name but old bootstrap "runtime"s may define only the old name. This patch, coupled with the ${SCHEME_LARGE} and ${SCHEME_COMPILER} generalizations of the `*.sh' build scripts, make it possible to call "src/Setup.sh" to transition a CVS source directory to a "distribution" state without first having the CVS Scheme installed to bootstrap. This consequently avoids a particularly subtle chicken-and-egg puzzle. A forthcoming update to "src/README.txt" spells out the details. --- v7/src/microcode/makegen/makegen.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/v7/src/microcode/makegen/makegen.scm b/v7/src/microcode/makegen/makegen.scm index dbb02723c..ae3d62058 100644 --- a/v7/src/microcode/makegen/makegen.scm +++ b/v7/src/microcode/makegen/makegen.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: makegen.scm,v 1.7 2005/06/26 05:36:52 cph Exp $ +$Id: makegen.scm,v 1.8 2006/06/02 07:00:07 ihtfisp Exp $ Copyright 2000,2001,2003 Massachusetts Institute of Technology @@ -141,7 +141,10 @@ USA. (define (generate-rule filename) (parse-rule (unbreak-lines - (call-with-output-string + ((if (lexical-unreferenceable? system-global-environment ; E.g., Build 7.7 + 'call-with-output-string) ; using 7.6? + with-string-output-port ;; For backward compatibility (pre-7.7) + call-with-output-string) (lambda (port) (run-shell-command (string-append "./makegen-cc " filename) 'OUTPUT port)))))) @@ -194,4 +197,4 @@ USA. (begin (write-string (car items*) port) (loop (cdr items*) new-column))))) - column))) \ No newline at end of file + column))) -- 2.25.1