#| -*-Scheme-*-
-$Id: global.scm,v 14.59 2003/02/14 18:28:32 cph Exp $
+$Id: global.scm,v 14.60 2003/04/14 18:19:23 cph Exp $
-Copyright (c) 1988-2001 Massachusetts Institute of Technology
+Copyright 1988,1989,1991,1992,1993,1995 Massachusetts Institute of Technology
+Copyright 1998,2000,2001,2003 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(system-vector-length system-vector-size)
system-vector-ref
system-vector-set!)
+
+(define (host-big-endian?)
+ ;; Assumptions:
+ ;; * Word length is 32 or 64 bits.
+ ;; * Type codes are at most 8 bits.
+ ;; * Zero is a non-pointer type code.
+ (case (object-datum
+ (vector-ref (object-new-type (ucode-type vector)
+ "\000\001\002\000\000\003\004\000")
+ 1))
+ ((#x00010200 #x0001020000030400) #t)
+ ((#x00020100 #x0004030000020100) #f)
+ (else (error "Unable to determine endianness of host."))))
\f
;;;; Potpourri
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.440 2003/03/21 17:51:09 cph Exp $
+$Id: runtime.pkg,v 14.441 2003/04/14 18:19:26 cph Exp $
Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
hook/exit
hook/quit
hook/scode-eval
+ host-big-endian?
hunk3-cons
identity-procedure
impurify