Change PACKAGE-SET-PATHNAME to accept an optional argument that
authorChris Hanson <org/chris-hanson/cph>
Thu, 14 Mar 2002 04:44:32 +0000 (04:44 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 14 Mar 2002 04:44:32 +0000 (04:44 +0000)
specifies the operating-system type.  This is useful for
cross-compilation.

v7/src/runtime/packag.scm

index e341f434ca503c86e2345764f4066f8e3bf8d184..bbe8e9b13a9d7e5023e0c79352870418e2f7b81c 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: packag.scm,v 14.39 2001/12/19 05:21:46 cph Exp $
+$Id: packag.scm,v 14.40 2002/03/14 04:44:32 cph Exp $
 
 Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology
 
@@ -201,14 +201,17 @@ USA.
   ;; program runs before it gets purified, some of its run-time state
   ;; can end up being purified also.
   (flush-purification-queue!))
-
-(define (package-set-pathname pathname)
+\f
+(define (package-set-pathname pathname #!optional os-type)
   (make-pathname (pathname-host pathname)
                 (pathname-device pathname)
                 (pathname-directory pathname)
                 (string-append (pathname-name pathname)
                                "-"
-                               (case microcode-id/operating-system
+                               (case (if (or (default-object? os-type)
+                                             (not os-type))
+                                         microcode-id/operating-system
+                                         os-type)
                                  ((NT) "w32")
                                  ((OS/2) "os2")
                                  ((UNIX) "unx")