From 47b17d450230ab7af4b880f2d0b4055f8cfcf15d Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sun, 8 Jul 2007 16:49:12 +0000 Subject: [PATCH] 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; --- v7/src/compiler/machines/C/cout.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.25.1