summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Earl <jearl@notengoamigos.org>2013-03-10 20:12:05 +0100
committerAndy Wingo <wingo@pobox.com>2013-03-10 20:12:09 +0100
commitcfe24bc4deef6f52ad3e07ffc513160890db4ff3 (patch)
treee311bce97be8573755c84260035f1dd7df9e1c0b
parent84dfde82ae8f6ec247c1c147c1e2ae50b207bad9 (diff)
downloadguile-cfe24bc4deef6f52ad3e07ffc513160890db4ff3.tar.gz
use chmod portably in (system base compile)
* module/system/base/compile.scm (call-with-output-file/atomic): Call chmod with the file name instead of the port.
-rw-r--r--module/system/base/compile.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index db05d1790..c522b74b5 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -57,7 +57,9 @@
(with-throw-handler #t
(lambda ()
(proc tmp)
- (chmod tmp (logand #o0666 (lognot (umask))))
+ ;; Chmodding by name instead of by port allows this chmod to
+ ;; work on systems without fchmod, like MinGW.
+ (chmod template (logand #o0666 (lognot (umask))))
(close-port tmp)
(rename-file template filename))
(lambda args