view patches/guile-1.9.15-mingw-compile.patch @ 6489:840b403f7762

mingw::guile: another round of 1.9 patches.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Mon, 07 Feb 2011 12:51:53 +0100
parents 919f33e40679
children
line wrap: on
line source

--- guile-1.9.15/module/system/base/compile.scm~	2011-01-26 23:03:16.000000000 +0100
+++ guile-1.9.15/module/system/base/compile.scm	2011-02-04 12:04:15.765055771 +0100
@@ -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))))