[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.
From: |
Jan Nieuwenhuizen |
Subject: |
[PATCH 2/5] [mingw]: Have compiled-file-name produce valid names. |
Date: |
Tue, 15 Feb 2011 16:35:00 +0100 |
From: Jan Nieuwenhuizen <address@hidden>
2011-02-04 Jan Nieuwenhuizen <address@hidden>
* module/system/base/compile.scm (compiled-file-name): Add
directory separator and remove colon for Mingw. Fixes
compilation on Windows.
---
module/system/base/compile.scm | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index 7d46713..8c72e54 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -100,11 +100,16 @@
".go")
(else (car %load-compiled-extensions))))
(and %compile-fallback-path
- (let ((f (string-append
+ (let* ((c (canonicalize-path file))
+ (f (string-append
%compile-fallback-path
;; no need for '/' separator here, canonicalize-path
;; will give us an absolute path
- (canonicalize-path file)
+ (if (eq? (string-ref c 1) #\:)
+ ;; on Mingw remove drive-letter separator `:' to
+ ;; obtain valid file name
+ (substring c 2)
+ c)
(compiled-extension))))
(and (false-if-exception (ensure-writable-dir (dirname f)))
f))))
--
1.7.1
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
- mingw runtime patches, Jan Nieuwenhuizen, 2011/02/15
- [PATCH 4/5] [mingw]: Delete existing target file before attempting rename., Jan Nieuwenhuizen, 2011/02/15
- [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.,
Jan Nieuwenhuizen <=
- [PATCH 1/5] [mingw]: Add implementation of canonicalize_file_name., Jan Nieuwenhuizen, 2011/02/15
- [PATCH 3/5] [mingw]: Do not export opendir, readdir etc., as dirents differ., Jan Nieuwenhuizen, 2011/02/15
- [PATCH 5/5] [mingw]: Use $LOCALAPPDATA as a possible root for cachedir., Jan Nieuwenhuizen, 2011/02/15