From a5d5c7d3f68abcae7212151e4bdde08c4aa4f61d Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Mon, 5 Oct 2009 15:54:46 +0200 Subject: [PATCH] src/cmp/cmpmain.lsp: clean up the files we create (*.c, *.h) before writing onto them. --- src/cmp/cmpmain.lsp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index 4c681e8ab..2b2ae2717 100755 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -496,7 +496,8 @@ static cl_object VV[VM]; #+msvc (unwind-protect (progn - (with-open-file (f "static_lib.tmp" :direction :output :if-does-not-exist :create :if-exists :supersede) + (with-open-file (f "static_lib.tmp" :direction :output + :if-does-not-exist :create :if-exists :supersede) (format f "/DEBUGTYPE:CV /OUT:~A ~A ~{~&\"~A\"~}" output-name o-name ld-flags)) (safe-system "link -lib @static_lib.tmp")) @@ -859,7 +860,8 @@ from the C language code. NIL means \"do not create the file\"." (defun compiler-pass2 (c-pathname h-pathname data-pathname system-p init-name shared-data &key input-designator) - (with-open-file (*compiler-output1* c-pathname :direction :output) + (with-open-file (*compiler-output1* c-pathname :direction :output + :if-does-not-exist :create :if-exists :supersede) (wt-comment-nl "Compiler: ~A ~A" (lisp-implementation-type) (lisp-implementation-version)) #-ecl-min (multiple-value-bind (second minute hour day month year) @@ -867,7 +869,8 @@ from the C language code. NIL means \"do not create the file\"." (wt-comment-nl "Date: ~D/~D/~D ~2,'0D:~2,'0D (yyyy/mm/dd)" year month day hour minute) (wt-comment-nl "Machine: ~A ~A ~A" (software-type) (software-version) (machine-type))) (wt-comment-nl "Source: ~A" input-designator) - (with-open-file (*compiler-output2* h-pathname :direction :output) + (with-open-file (*compiler-output2* h-pathname :direction :output + :if-does-not-exist :create :if-exists :supersede) (wt-nl1 "#include " *cmpinclude*) (catch *cmperr-tag* (ctop-write init-name h-pathname