Temporary definition of random-bytevector for 9.2 hosts.
authorMatt Birkholz <matt@birchwood-abbey.net>
Wed, 22 Feb 2017 22:56:22 +0000 (15:56 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Wed, 22 Feb 2017 22:56:22 +0000 (15:56 -0700)
src/compiler/base/utils.scm

index 05ca39e142e8606fed383b83580c76c60d493a13..03a6a63f6132852aa5db8441f38d2c4c62b54ee4 100644 (file)
@@ -31,6 +31,13 @@ USA.
 \f
 ;;;; Miscellaneous
 
+;; Temporary definition, for 9.2 hosts.
+(define (random-bytevector n #!optional state)
+  (let ((env (->environment '(runtime random-number))))
+    ((if (environment-bound? env 'random-byte-vector)
+        (access random-byte-vector env)
+        (access random-bytevector env)) n state)))
+
 (define (three-way-sort = set set* receiver)
   (let ((member? (member-procedure =)))
     (define (loop set set* receiver)