diff options
| author | Eli Zaretskii | 2018-01-19 17:31:54 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-01-19 17:31:54 +0200 |
| commit | c6c05e2aa9d28a74df0b61b4f56745f1248a779e (patch) | |
| tree | 5aaf6109b80d8d4df1849912a6b4a0822ad442fe | |
| parent | a41ad3df9ff4377a99439b4541535c522fe2f845 (diff) | |
| download | emacs-c6c05e2aa9d28a74df0b61b4f56745f1248a779e.tar.gz emacs-c6c05e2aa9d28a74df0b61b4f56745f1248a779e.zip | |
Unbreak building Emacs on FreeBSD
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't create
the temporary file under temporary-file-directory if the file
being compiled is specified by an absolute file name. This avoids
problems with ACL copying from temporary-file-directory on
FreeBSD. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index acba9e2df5e..3c9c62eb23d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1933,7 +1933,17 @@ The value is non-nil if there were no errors, nil if errors." | |||
| 1933 | ;; parallel bootstrap), it does not risk getting a | 1933 | ;; parallel bootstrap), it does not risk getting a |
| 1934 | ;; half-finished file. (Bug#4196) | 1934 | ;; half-finished file. (Bug#4196) |
| 1935 | (tempfile | 1935 | (tempfile |
| 1936 | (make-temp-file (file-name-nondirectory target-file))) | 1936 | ;; If target-file is relative and includes |
| 1937 | ;; leading directories, make-temp-file will | ||
| 1938 | ;; assume those leading directories exist | ||
| 1939 | ;; under temporary-file-directory, which might | ||
| 1940 | ;; not be true. So strip leading directories | ||
| 1941 | ;; from relative file names before calling | ||
| 1942 | ;; make-temp-file. | ||
| 1943 | (if (file-name-absolute-p target-file) | ||
| 1944 | (make-temp-file target-file) | ||
| 1945 | (make-temp-file | ||
| 1946 | (file-name-nondirectory target-file)))) | ||
| 1937 | (default-modes (default-file-modes)) | 1947 | (default-modes (default-file-modes)) |
| 1938 | (temp-modes (logand default-modes #o600)) | 1948 | (temp-modes (logand default-modes #o600)) |
| 1939 | (desired-modes (logand default-modes #o666)) | 1949 | (desired-modes (logand default-modes #o666)) |