[asdf-devel] rename-file-overwriting-target on clisp

Sam Steingold sds at gnu.org
Tue Oct 15 18:19:24 UTC 2013


Hi,
I wonder why this function has a special case for clisp:

  (defun rename-file-overwriting-target (source target)
    #+clisp ;; But for a bug in CLISP 2.48, we should use :if-exists
:overwrite and be atomic
    (posix:copy-file source target :method :rename)
    #-clisp
    (rename-file source target
                 #+clozure :if-exists #+clozure :rename-and-delete))

it would seem that a more portable solution would be

(defun rename-file-overwriting-target (source target)
  #-clozure (when (probe-file target) (delete-file target))
  (rename-file source target
                 #+clozure :if-exists #+clozure :rename-and-delete))

this code causes build problems in clisp because when asdf is
distributed with clisp, it is built before the posix module is
available.

also, nobody uses 2.48 anymore, so I think you can safely assume 2.49.

thanks.

-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net/>



More information about the asdf-devel mailing list