From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.devel Subject: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names. Date: Tue, 15 Feb 2011 16:35:00 +0100 Message-ID: <1297784103-18322-3-git-send-email-janneke-list@xs4all.nl> References: <1297784103-18322-1-git-send-email-janneke-list@xs4all.nl> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1297784125 13980 80.91.229.12 (15 Feb 2011 15:35:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 15:35:25 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Feb 15 16:35:20 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PpMvt-0007t3-D6 for guile-devel@m.gmane.org; Tue, 15 Feb 2011 16:35:17 +0100 Original-Received: from localhost ([127.0.0.1]:49694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpMvs-0002HE-R9 for guile-devel@m.gmane.org; Tue, 15 Feb 2011 10:35:16 -0500 Original-Received: from [140.186.70.92] (port=56884 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpMvn-0002GV-Ss for guile-devel@gnu.org; Tue, 15 Feb 2011 10:35:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpMvm-0005sl-Re for guile-devel@gnu.org; Tue, 15 Feb 2011 10:35:11 -0500 Original-Received: from smtp-vbr19.xs4all.nl ([194.109.24.39]:1105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpMvm-0005sB-Dw for guile-devel@gnu.org; Tue, 15 Feb 2011 10:35:10 -0500 Original-Received: from vuurvlieg.flower (peder.onsbrabantnet.nl [88.159.206.46] (may be forged)) (authenticated bits=0) by smtp-vbr19.xs4all.nl (8.13.8/8.13.8) with ESMTP id p1FFZ8QY082257 for ; Tue, 15 Feb 2011 16:35:09 +0100 (CET) (envelope-from janneke-list@xs4all.nl) X-Mailer: git-send-email 1.7.1 In-Reply-To: <1297784103-18322-1-git-send-email-janneke-list@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-operating-system: by eggs.gnu.org: FreeBSD 4.6-4.9 X-Received-From: 194.109.24.39 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11641 Archived-At: From: Jan Nieuwenhuizen 2011-02-04 Jan Nieuwenhuizen * 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 | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.nl