From: Matt Birkholz Date: Wed, 22 Feb 2017 22:56:22 +0000 (-0700) Subject: Temporary definition of random-bytevector for 9.2 hosts. X-Git-Tag: mit-scheme-pucked-9.2.12~220^2~13 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fd54b803fc26ffe5701a0f62a117ec3ce71087e1;p=mit-scheme.git Temporary definition of random-bytevector for 9.2 hosts. --- diff --git a/src/compiler/base/utils.scm b/src/compiler/base/utils.scm index 05ca39e14..03a6a63f6 100644 --- a/src/compiler/base/utils.scm +++ b/src/compiler/base/utils.scm @@ -31,6 +31,13 @@ USA. ;;;; 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)