From fae373d9eaf2464c1e1001ce363368a74530976c Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Mon, 24 Aug 2015 21:45:39 +0200 Subject: [PATCH] Ensure "try-compile" from setup-api cleans up tempfiles. It now creates the file with a controlled name, which can then be cleaned up. Fixes #1213 --- NEWS | 6 ++++++ setup-api.scm | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ab034eb..c2cda9f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +4.10.1 + +- Core libraries + - try-compile from setup-api cleans up temporary output files (#1213). + + 4.10.0 - Security fixes diff --git a/setup-api.scm b/setup-api.scm index 547558a..0fdfc1e 100644 --- a/setup-api.scm +++ b/setup-api.scm @@ -528,7 +528,7 @@ cc " " (if compile-only "-c" "") " " cflags " " *target-cflags* " " - fname " " + (shellpath fname) " -o " (shellpath oname) " " (if compile-only "" (conc "-L" *target-lib-home* " " ldflags " " *target-libs*) ) @@ -538,6 +538,7 @@ cmd) ) ) ) ) (when verb (print (if (zero? r) "succeeded." "failed."))) (ignore-errors ($system (sprintf "~A ~A" *remove-command* (shellpath fname)))) + (ignore-errors ($system (sprintf "~A ~A" *remove-command* (shellpath oname)))) (zero? r) ) ) (define test-compile try-compile) -- 2.1.4