-
Notifications
You must be signed in to change notification settings - Fork 4
/
load-logical-pathnames.lisp
99 lines (76 loc) · 3.25 KB
/
load-logical-pathnames.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: SNEPS; Base: 10 -*-
;; Copyright (C) 1984--2013
;; Research Foundation of State University of New York
;; Version: $Id: load-logical-pathnames.lisp,v
;; This file is part of SNePS.
;; $BEGIN LICENSE$
;;; The contents of this file are subject to the University at
;;; Buffalo Public License Version 1.0 (the "License"); you may
;;; not use this file except in compliance with the License. You
;;; may obtain a copy of the License at
;;; http://www.cse.buffalo. edu/sneps/Downloads/ubpl.pdf.
;;;
;;; Software distributed under the License is distributed on an
;;; "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
;;; or implied. See the License for the specific language gov
;;; erning rights and limitations under the License.
;;;
;;; The Original Code is SNePS 2.8.
;;;
;;; The Initial Developer of the Original Code is Research Foun
;;; dation of State University of New York, on behalf of Univer
;;; sity at Buffalo.
;;;
;;; Portions created by the Initial Developer are Copyright (C)
;;; 2011 Research Foundation of State University of New York, on
;;; behalf of University at Buffalo. All Rights Reserved.
;; $END LICENSE$
;; This file actually installs translations in the logical pathname
;; package. This is a separate file so that the acl standalone can
;; also reestablish the translations (which, starting with version 4.3
;; are thrown away when a dumped image restarts.)
(setf (lp::logical-pathname-translations "sneps")
*sneps-logical-pathname-translations*)
(setf (lp::logical-pathname-translations "sneps-p")
*sneps-patch-translations*)
;; For backward compatibility:
(setf (lp::logical-pathname-translations "sneps21")
*sneps-logical-pathname-translations*)
#+lpmk
(progn
(when (eq *sneps-use-lpmk* :redefine)
;; Redefine standard functions such as `load' with LPMK versions
;; that understand logical pathnames. If your Lisp locks the LISP
;; package you'll need to find out how to break that lock.
#+allegro
(let ((*enable-package-locked-errors* nil))
(lp:redefine-standard-functions))
#+clisp
(#.(if (fboundp 'appease-cerrors) 'appease-cerrors 'progn)
(lp:redefine-standard-functions))
#-(or allegro clisp)
(lp:redefine-standard-functions))
;; Define type of the default host:
(setf (lp:physical-host-type nil)
#+unix :unix
#+lm-unix :unix
#+(and explorer (not lm-unix)) :explorer
#+(and symbolics (not lm-unix)) :symbolics
#+vms :vms)
;; In case the various physical directories contain a host itself
;; we must define its type; assume it is the same as for the default
;; host -- this assumption might be wrong!!
(dolist (dir `(,*sneps-directory*
,*sneps-patch-directory*))
(let ((host (lp::get-host-string dir)))
(when (and host (null (lp:physical-host-type host)))
(setf (lp:physical-host-type host)
(lp:physical-host-type nil)))))
;; define unique canonical translations for LISP and FASL extensions:
(lp:define-host-type :unix
(:canonicals (:type (:lisp #.*sneps-default-lisp-extension*)
(:fasl #.*sneps-binary-extension*))))
(lp:define-host-type :vms
(:canonicals (:type (:lisp #.*sneps-default-lisp-extension*)
(:fasl #.*sneps-binary-extension*))))
) ;; progn