diff 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 diff
--- a/patches/guile-1.9.15-mingw-compile.patch	Fri Feb 04 00:47:47 2011 +0100
+++ b/patches/guile-1.9.15-mingw-compile.patch	Mon Feb 07 12:51:53 2011 +0100
@@ -1,10 +1,21 @@
 --- 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-03 23:29:08.090142894 +0100
-@@ -104,6 +104,7 @@
++++ 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
-+		 "/" ;; which does not start with / on MINGW
-                  (canonicalize-path file)
+-                 (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))))