* new feature: WITH-COMPILATION-UNIT now accepts a non-standard
:SOURCE-PLIST option. See (DOCUMENTATION #'WITH-COMPILATION-UNIT T)
for more information.
+ * TRUENAME and PROBE-FILE now correctly resolve symlinks even if the
+ pathname is a directory pathname.
* SB-SPROF now works (more) reliably on non-GENCGC platforms.
* fixed some lockups due to gc/thread interaction
* dynamic space size on PPC has been increased to 768Mb. (thanks to
(defun unix-resolve-links (pathname)
(declare (type simple-base-string pathname))
(aver (not (relative-unix-pathname? pathname)))
+ ;; KLUDGE: readlink and lstat are unreliable if given symlinks
+ ;; ending in slashes -- fix the issue here instead of waiting for
+ ;; libc to change...
+ (let ((len (length pathname)))
+ (when (and (plusp len) (eql #\/ (schar pathname (1- len))))
+ (setf pathname (subseq pathname 0 (1- len)))))
(/noshow "entering UNIX-RESOLVE-LINKS")
(loop with previous-pathnames = nil do
- (/noshow pathname previous-pathnames)
- (let ((link (unix-readlink pathname)))
+ (/noshow pathname previous-pathnames)
+ (let ((link (unix-readlink pathname)))
(/noshow link)
;; Unlike the old CMU CL code, we handle a broken symlink by
;; returning the link itself. That way, CL:TRUENAME on a
echo this is a test > $testdir/test-2.tmp
echo this is a test > $testdir/wild\?test.tmp
cd $testdir
+ln -s $testdir dirlinktest
ln -s test-1.tmp link-1
ln -s `pwd`/test-2.tmp link-2
ln -s i-do-not-exist link-3
ln -s link-5 link-6
ln -s `pwd`/link-6 link-5
expected_truenames=\
-"'(#p\"$testdir/link-3\"\
+"'(#p\"$testdir/\"\
+ #p\"$testdir/link-3\"\
#p\"$testdir/link-4\"\
#p\"$testdir/link-5\"\
#p\"$testdir/link-6\"\
(format t "~&TRUENAMES=~S~%" truenames)
(finish-output)
(assert (equal truenames $expected_truenames)))
+ (assert (equal (truename "dirlinktest") #p"$testdir/"))
+ (assert (equal (truename "dirlinktest/") #p"$testdir/"))
(assert (equal (truename "test-1.tmp") #p"$testdir/test-1.tmp"))
(assert (equal (truename "link-1") #p"$testdir/test-1.tmp"))
(assert (equal (truename "link-2") #p"$testdir/test-2.tmp"))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.1.26"
+"0.9.1.27"