summaryrefslogtreecommitdiffstats
path: root/Link.scm
diff options
context:
space:
mode:
authorThomas Bushnell <tb@debian.org>2005-10-27 12:00:49 -0700
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
commit4e063c0de0bf319c9201cefa6f399364041bb7b9 (patch)
tree61a326cd4ab69f610d2e10313db2a641b6d0b4dd /Link.scm
parent5f7b0413c1bb0f96bb613ad74c0978f44116a136 (diff)
parent302e3218b7d487539ec305bf23881a6ee7d5be99 (diff)
downloadscm-4e063c0de0bf319c9201cefa6f399364041bb7b9.tar.gz
scm-4e063c0de0bf319c9201cefa6f399364041bb7b9.zip
Import Debian changes 5e1-1debian/5e1-1
scm (5e1-1) unstable; urgency=low * New upstream release. (Closes: #335970) * debian/rules (SCM_OPTIONS): Remove -F turtlegr; the file supporting this option seems to have gone by the wayside. * debian/rules (binary-arch): Don't try to install grtest.scm; it's gone now. * debian/rules (build-stamp): Use tee to capture output of ./build so that we can capture a copy of the file in the build log. * scm.1: Fix spelling errors in manual page: verobse -> verbose; qoutes -> quotes; aguments -> arguments; neccessary -> necessary; preceeds -> precedes. syncronization -> synchronization. (Closes: #300131) * debian/postinst, debian/prerm: Assume that install-docs is in the standard place, and test for it there with test -x. (Closes: #292996)
Diffstat (limited to 'Link.scm')
-rw-r--r--Link.scm31
1 files changed, 14 insertions, 17 deletions
diff --git a/Link.scm b/Link.scm
index 8e01de9..e0ea89b 100644
--- a/Link.scm
+++ b/Link.scm
@@ -57,7 +57,6 @@
(map char-downcase (string->list name))))))
(define link:link
(lambda (file . libs)
- (define oloadpath *load-pathname*)
(let* ((sl (string-length file))
(lasl (string-length link:able-suffix))
(fname (let loop ((i (- sl 1)))
@@ -72,26 +71,23 @@
(substring fname 0 (- nsl lasl)))
(else fname)))
(linkobj #f))
- (set! *load-pathname* file)
(if (and (provided? 'sun-dl)
(< 3 sl)
(not (eqv? (string-ref file 0) '#\/)))
(set! file (string-append "./" file)))
- (set! linkobj (or (provided? 'sun-dl) (dyn:link file)))
- (and linkobj
- (for-each (lambda (lib)
- (or (dyn:link lib) (slib:error "couldn't link: " lib)))
- libs))
- (if (provided? 'sun-dl) (set! linkobj (dyn:link file)))
- (cond ((not linkobj)
- (set! *load-pathname* oloadpath) #f)
- ((dyn:call (file->init_name name) linkobj)
- (set! *load-pathname* oloadpath) #t)
- (else
- (dyn:unlink linkobj)
- (set! *load-pathname* oloadpath) #f)))))))
+ (with-load-pathname file
+ (lambda ()
+ (set! linkobj (or (provided? 'sun-dl) (dyn:link file)))
+ (and linkobj
+ (for-each (lambda (lib)
+ (or (dyn:link lib)
+ (slib:error "couldn't link: " lib)))
+ libs))
+ (if (provided? 'sun-dl) (set! linkobj (dyn:link file)))
+ (cond ((not linkobj) #f)
+ ((dyn:call (file->init_name name) linkobj) #t)
+ (else (dyn:unlink linkobj) #f))))))))
-(cond
((defined? vms:dynamic-link-call)
(define link:able-suffix #f)
(define (link:link file)
@@ -103,7 +99,8 @@
(set! dir (substring file 0 (+ i 1)))
(set! fil (substring file (+ i 1) (string-length file))))
(else (loop (- i 1)))))
- (vms:dynamic-link-call dir fil (file->init_name fil)))))
+ (with-load-pathname file
+ (lambda () (vms:dynamic-link-call dir fil (file->init_name fil)))))))
(cond
((provided? 'sun-dl)