records: Have ABI check work well for cross-compilation.

Reported by Jan (janneke) Nieuwenhuizen <janneke@gnu.org>.

* guix/records.scm (define-record-type*): Use
'target-most-positive-fixnum' on Guile 3 instead of 'most-positive-fixnum'.
This commit is contained in:
Ludovic Courtès 2020-04-07 23:55:14 +02:00
parent 041c3c22dc
commit a05ad01122
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -24,6 +24,7 @@ (define-module (guix records)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:use-module (ice-9 regex) #:use-module (ice-9 regex)
#:use-module (ice-9 rdelim) #:use-module (ice-9 rdelim)
#:autoload (system base target) (target-most-positive-fixnum)
#:export (define-record-type* #:export (define-record-type*
this-record this-record
@ -360,7 +361,9 @@ (define (compute-abi-cookie field-specs)
(((field get properties ...) ...) (((field get properties ...) ...)
(string-hash (object->string (string-hash (object->string
(syntax->datum #'((field properties ...) ...))) (syntax->datum #'((field properties ...) ...)))
most-positive-fixnum)))) (cond-expand
(guile-3 (target-most-positive-fixnum))
(else most-positive-fixnum))))))
(syntax-case s () (syntax-case s ()
((_ type syntactic-ctor ctor pred ((_ type syntactic-ctor ctor pred