From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#10474: Building guile 2.x under mingw + msys Date: Tue, 19 Feb 2013 22:44:39 +0100 Message-ID: <87liakx9ko.fsf@pobox.com> References: <87pqerdxq4.fsf@pobox.com> <83ehuy698u.fsf@gnu.org> <8362ga5h7h.fsf@gnu.org> <87r4ywpnv0.fsf@gnu.org> <83r4yw49u6.fsf@gnu.org> <87y5smnj86.fsf@pobox.com> <83ehudp29y.fsf@gnu.org> <87sj4s7fcc.fsf@pobox.com> <83bobgp4ui.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361310302 15812 80.91.229.3 (19 Feb 2013 21:45:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Feb 2013 21:45:02 +0000 (UTC) Cc: ludo@gnu.org, 10474@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 19 22:45:24 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U7v07-0005S7-Gk for guile-bugs@m.gmane.org; Tue, 19 Feb 2013 22:45:23 +0100 Original-Received: from localhost ([::1]:43594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7uzm-0002he-Rf for guile-bugs@m.gmane.org; Tue, 19 Feb 2013 16:45:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7uzh-0002gL-VR for bug-guile@gnu.org; Tue, 19 Feb 2013 16:45:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7uzf-0000Xu-Nv for bug-guile@gnu.org; Tue, 19 Feb 2013 16:44:57 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7uzf-0000Xh-Jr for bug-guile@gnu.org; Tue, 19 Feb 2013 16:44:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U7v0j-0008ED-RC for bug-guile@gnu.org; Tue, 19 Feb 2013 16:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 19 Feb 2013 21:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10474 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10474-submit@debbugs.gnu.org id=B10474.136131035331614 (code B ref 10474); Tue, 19 Feb 2013 21:46:01 +0000 Original-Received: (at 10474) by debbugs.gnu.org; 19 Feb 2013 21:45:53 +0000 Original-Received: from localhost ([127.0.0.1]:37476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7v0a-0008Dr-V0 for submit@debbugs.gnu.org; Tue, 19 Feb 2013 16:45:53 -0500 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:45728 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7v0Y-0008Dj-Ip for 10474@debbugs.gnu.org; Tue, 19 Feb 2013 16:45:51 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 18DFFCEE5; Tue, 19 Feb 2013 16:44:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=30H9LZHAUD7vWC6FHccPYf/FAq0=; b=Srfxdv Qb27ZN36NUQFstY2h/65nFuMyzsMiN4Jngpi2PvTtVzcVtIfjlYzTwBccffJC3L8 ql8byrr43uR7nFaM516YNpTbUAXGZPUaWS7TL+D+CRcE+x9U5YN9I+gq0KFa2TKs rai8hS6uyUYn7CuyYL8BcfiJjnKBXbqn+jgPs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=FSu10xCajb+iAq9zDhPKb9e96gF7z5/M MKAO1EZcRhgTK25/hzSOjMh1MvNeeXMDvaTO0TlDk5tfHDx8dIQdzqT0U9mmvEgF qfP8sBy3vcxZGgjDHgLA00AtRdEx9OJhE4muhwFlFdtft+pypI93SRUuBoIUPmMp olHgYYZK4Jo= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 0EE7FCEE4; Tue, 19 Feb 2013 16:44:43 -0500 (EST) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 69895CEE3; Tue, 19 Feb 2013 16:44:42 -0500 (EST) In-Reply-To: <83bobgp4ui.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Feb 2013 19:53:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 91B74396-7ADD-11E2-9C6F-BB980E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6761 Archived-At: Hi, On Tue 19 Feb 2013 18:53, Eli Zaretskii writes: >> + (define (unc-path?) >> + ;; Universal Naming Convention (UNC) paths start with \\, and >> + ;; are always absolute. >> + (string-prefix? "\\\\" path)) > > A UNC file name can also begin with 2 slashes, as in "//foo/bar/". In > general, Windows system calls treat both kinds of slashes identically. Interesting, thanks. >> (define (canonical->suffix canon) >> (cond >> - ((string-prefix? "/" canon) canon) >> - ((and (> (string-length canon) 2) >> - (eqv? (string-ref canon 1) #\:)) >> - ;; Paths like C:... transform to /C... >> - (string-append "/" (substring canon 0 1) (substring canon 2))) >> + ((and (not (string-null? canon)) >> + (path-separator? (string-ref canon 0))) >> + canon) >> + ((and (eq? (system-path-convention) 'windows) >> + (absolute-path? canon)) >> + ;; An absolute path that doesn't start with a path separator starts with a >> + ;; drive component. Transform the drive component to a path element: >> + ;; c:\foo -> \c\foo. > > Why is this transformation needed? Native Windows system calls will > not understand "/c/foo" syntax. What is this about? (I know it was > in the original code, but I didn't understand it then, either.) Auto-compiling /foo/bar/baz.scm produces $HOME/.cache/guile/2.0/ccache/foo/bar/baz.go. This turns the drive component into a path element on Windows so compiling C:/foo.scm caches $HOME/.cache/guile/2.0/ccache/c/foo.go. Andy -- http://wingolog.org/