From 92c063aa9c86b96547abbe010f86c4bae8d775f2 Mon Sep 17 00:00:00 2001 From: Camm Maguire Date: Sun, 13 Nov 2022 12:55:14 +0000 Subject: [PATCH] Bug-Debian: https://bugs.debian.org/843303 TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. gcl (2.6.12-46) unstable; urgency=high * pathnames1.12 * Bug fix: "maintainer script(s) do not start on #!", thanks to treinen@debian.org; (Closes: #843303). Gbp-Pq: Name pathnames1.12 --- lsp/gcl_iolib.lsp | 9 ++++----- lsp/gcl_listlib.lsp | 4 ++-- lsp/gcl_truename.lsp | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lsp/gcl_iolib.lsp b/lsp/gcl_iolib.lsp index 93a7d08..60a18d9 100755 --- a/lsp/gcl_iolib.lsp +++ b/lsp/gcl_iolib.lsp @@ -457,11 +457,10 @@ if-exists iesp if-does-not-exist idnesp external-format))) (when (typep s 'stream) (c-set-stream-object1 s pf) s))) -(defun load-pathname-exists (z &aux (z (link-expand (namestring z)))) - (cond ((eq (stat z) :file) z) - (*allow-gzipped-file* - (when (eq (stat (string-concatenate (namestring z) ".gz")) :file) - z)))) +(defun load-pathname-exists (z) + (or (probe-file z) + (when *allow-gzipped-file* + (probe-file (string-concatenate (namestring z) ".gz"))))) (defun load-pathname (p print if-does-not-exist external-format &aux (pp (merge-pathnames p)) diff --git a/lsp/gcl_listlib.lsp b/lsp/gcl_listlib.lsp index 21ec205..b93d2fe 100755 --- a/lsp/gcl_listlib.lsp +++ b/lsp/gcl_listlib.lsp @@ -123,8 +123,8 @@ (defun smallnthcdr (n x) (declare (fixnum n)) - (cond ((atom x) (when x (tp-error x proper-list))) - ((= n 0) x) + (cond ((= n 0) x) + ((atom x) (when x (tp-error x proper-list))) ((smallnthcdr (1- n) (cdr x))))) (defun bignthcdr (n i s f) diff --git a/lsp/gcl_truename.lsp b/lsp/gcl_truename.lsp index e7a754e..130f2e0 100644 --- a/lsp/gcl_truename.lsp +++ b/lsp/gcl_truename.lsp @@ -38,5 +38,5 @@ (check-type pd pathname-designator) (when (wild-pathname-p pn) (error 'file-error :pathname pn :format-control "Pathname is wild")) - (when (eq (stat (namestring pn)) :file) + (when (eq (stat (link-expand (namestring pn))) :file) (truename pn))) -- 2.30.2