1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50:26 +02:00

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.
This commit is contained in:
Jason Earl 2013-03-10 20:12:05 +01:00 committed by Andy Wingo
parent 84dfde82ae
commit cfe24bc4de

View file

@ -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