From: Taylor R. Campbell Date: Sun, 8 Jul 2007 16:49:12 +0000 (+0000) Subject: Fix bug in dynamic initialization code: the nonce must be quoted. X-Git-Tag: 20090517-FFI~497 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=47b17d450230ab7af4b880f2d0b4055f8cfcf15d;p=mit-scheme.git Fix bug in dynamic initialization code: the nonce must be quoted. Otherwise the C compiler will choke on any file compiled for dynamic loading. Was this ever tested?? This same change could be effected in liarc.h by changing DECLARE_DYNAMIC_INITIALIZATION & DECLARE_DYNAMIC_OBJECT_INITIALIZATION so that they generate the line const char dload_nonce [] = #nonce; rather than const char dload_nonce [] = nonce; --- diff --git a/v7/src/compiler/machines/C/cout.scm b/v7/src/compiler/machines/C/cout.scm index 50d1cb0a2..af43dba3c 100644 --- a/v7/src/compiler/machines/C/cout.scm +++ b/v7/src/compiler/machines/C/cout.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: cout.scm,v 1.41 2007/06/06 19:42:38 cph Exp $ +$Id: cout.scm,v 1.42 2007/07/08 16:49:12 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -509,12 +509,12 @@ USA. (define (declare-dynamic-initialization handle) (c:line (c:call "DECLARE_DYNAMIC_INITIALIZATION" (c:string handle) - (vector-8b->hexadecimal (random-byte-vector 8))))) + (c:string (vector-8b->hexadecimal (random-byte-vector 8)))))) (define (declare-dynamic-object-initialization handle) (c:line (c:call "DECLARE_DYNAMIC_OBJECT_INITIALIZATION" (c:string handle) - (vector-8b->hexadecimal (random-byte-vector 8))))) + (c:string (vector-8b->hexadecimal (random-byte-vector 8)))))) (define (declare-subcodes decl-name blocks) (if (and (pair? blocks)