From d2b81e7acb0d2ce2d6a9c6826e6330a8358ff323 Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Tue, 13 Jan 1998 19:18:02 +0000
Subject: [PATCH] Re-seed the *random-state* as an after save initialisation.

Move the loading of the random number generator until after the
loading of save.lisp so that *after-save-initializations* is
initialised.
---
 code/rand-mt19937.lisp | 7 ++++++-
 tools/worldbuild.lisp  | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/code/rand-mt19937.lisp b/code/rand-mt19937.lisp
index 16e6cea76..6d101f310 100644
--- a/code/rand-mt19937.lisp
+++ b/code/rand-mt19937.lisp
@@ -6,7 +6,7 @@
 ;;; placed in the Public domain, and is provided 'as is'.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/rand-mt19937.lisp,v 1.4 1997/12/16 02:55:16 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/rand-mt19937.lisp,v 1.5 1998/01/13 19:18:00 dtc Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -85,6 +85,11 @@
 					       #xffffffff))))
 	  (t (error "Argument is not a RANDOM-STATE, T or NIL: ~S" state)))))
 
+(pushnew #'(lambda ()
+	     (init-random-state (logand (get-universal-time) #xffffffff)
+				(random-state-state *random-state*)))
+	 ext:*after-save-initializations*)
+
 
 ;;;; Random entries:
 
diff --git a/tools/worldbuild.lisp b/tools/worldbuild.lisp
index c6ffa1f93..d0d761081 100644
--- a/tools/worldbuild.lisp
+++ b/tools/worldbuild.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/worldbuild.lisp,v 1.39 1997/12/12 15:28:20 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/worldbuild.lisp,v 1.40 1998/01/13 19:18:02 dtc Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -105,10 +105,10 @@
     ,@(when (c:backend-featurep :gencgc)
 	'("target:code/scavhook"))
 
+    "target:code/save"
     ,@(if (c:backend-featurep :random-mt19937)
 	  '("target:code/rand-mt19937")
 	  '("target:code/rand"))
-    "target:code/save"
     "target:code/alieneval"
     "target:code/c-call"
     "target:code/sap"
-- 
GitLab