add scheme-fork-version-number

Include an extra part in the Chez Scheme version number, which both
helps indicates the Racket fork and versions it.

original commit: 00678e29bb9f05de2ccaec8585126e967cdcc6f4
This commit is contained in:
Matthew Flatt 2019-09-13 06:58:22 -06:00
parent f1a839069d
commit 77ea4ccb78
5 changed files with 35 additions and 13 deletions

View File

@ -62,7 +62,7 @@ InstallLZ4Target=
# no changes should be needed below this point #
###############################################################################
Version=csv9.5.3
Version=csv9.5.3.1
Include=boot/$m
PetiteBoot=boot/$m/petite.boot
SchemeBoot=boot/$m/scheme.boot

27
s/7.ss
View File

@ -624,11 +624,17 @@
(define $format-scheme-version
(lambda (n)
(if (= (logand n 255) 0)
(format "~d.~d"
(ash n -16)
(logand (ash n -8) 255))
(format "~d.~d.~d"
(ash n -16)
(if (= (logand n 255) 0)
(format "~d.~d"
(ash n -24)
(logand (ash n -16) 255))
(format "~d.~d.~d"
(ash n -24)
(logand (ash n -16) 255)
(logand (ash n -8) 255)))
(format "~d.~d.~d.~d"
(ash n -24)
(logand (ash n -16) 255)
(logand (ash n -8) 255)
(logand n 255)))))
@ -639,7 +645,16 @@
(lambda ()
(let ([n (constant scheme-version)])
(values
(ash n -16)
(ash n -24)
(logand (ash n -16) 255)
(logand (ash n -8) 255)))))
(define scheme-fork-version-number
(lambda ()
(let ([n (constant scheme-version)])
(values
(ash n -24)
(logand (ash n -16) 255)
(logand (ash n -8) 255)
(logand n 255)))))

View File

@ -328,7 +328,7 @@
[(_ foo e1 e2) e1] ...
[(_ bar e1 e2) e2]))))])))
(define-constant scheme-version #x00090503)
(define-constant scheme-version #x09050301)
(define-syntax define-machine-types
(lambda (x)

View File

@ -153,11 +153,17 @@
(define scheme-version ; adapted from 7.ss
(let ([n (constant scheme-version)])
(if (= (logand n 255) 0)
(format "~d.~d"
(ash n -16)
(logand (ash n -8) 255))
(format "~d.~d.~d"
(ash n -16)
(if (= (logand n 255) 0)
(format "~d.~d"
(ash n -24)
(logand (ash n -16) 255))
(format "~d.~d.~d"
(ash n -24)
(logand (ash n -16) 255)
(logand (ash n -8) 255)))
(format "~d.~d.~d.~d"
(ash n -24)
(logand (ash n -16) 255)
(logand (ash n -8) 255)
(logand n 255)))))

View File

@ -902,6 +902,7 @@
(petite? [sig [() -> (boolean)]] [flags pure unrestricted])
(scheme-version [sig [() -> (string)]] [flags pure unrestricted true])
(scheme-version-number [sig [() -> (uint uint uint)]] [flags discard unrestricted])
(scheme-fork-version-number [sig [() -> (uint uint uint uint)]] [flags discard unrestricted])
(threaded? [sig [() -> (boolean)]] [flags pure unrestricted cp02])
)