From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Windows file names snafu Date: Mon, 30 Jun 2014 13:12:44 +0200 Message-ID: <87simm1wib.fsf@gnu.org> References: <83k37z65wr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1404126797 14004 80.91.229.3 (30 Jun 2014 11:13:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Jun 2014 11:13:17 +0000 (UTC) Cc: Mark H Weaver , guile-devel@gnu.org To: Eli Zaretskii , Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jun 30 13:13:05 2014 Return-path: Envelope-to: guile-devel@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 1X1ZWD-0005Vc-JV for guile-devel@m.gmane.org; Mon, 30 Jun 2014 13:13:05 +0200 Original-Received: from localhost ([::1]:33452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1ZWD-0003GG-2U for guile-devel@m.gmane.org; Mon, 30 Jun 2014 07:13:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1ZW5-0003G4-IW for guile-devel@gnu.org; Mon, 30 Jun 2014 07:13:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1ZVz-0007bc-V9 for guile-devel@gnu.org; Mon, 30 Jun 2014 07:12:57 -0400 Original-Received: from hera.aquilenet.fr ([2a01:474::1]:53646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1ZVu-0007X9-1b; Mon, 30 Jun 2014 07:12:46 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 697382EE1; Mon, 30 Jun 2014 13:12:45 +0200 (CEST) Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mt7BiPxFfhX3; Mon, 30 Jun 2014 13:12:45 +0200 (CEST) Original-Received: from pluto (eduroam-234a.sophia.inria.fr [193.51.208.234]) by hera.aquilenet.fr (Postfix) with ESMTPSA id DDD7622F4; Mon, 30 Jun 2014 13:12:44 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Messidor an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <83k37z65wr.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 29 Jun 2014 19:23:48 +0300") User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:474::1 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17249 Archived-At: Eli Zaretskii skribis: > This issue is caused by code that treats file names like strings. > That fails when the compared strings differ by their directory > separators ('/' vs '\'). I bumped into this in a couple of tests that > failed or even aborted with backtrace. > > A related issue is the file names passed to Bash via open-pipe and > friends: Bash treats backslashes as escape characters, so commands > start to fail in mysterious ways. > > For these two reasons, I think Guile should strive to keep file names > in Unix-compatible form, i.e. using forward slashes as directory > separators. I see, makes sense to me. > The patch below is just to show what I modified; if this approach is > accepted, I think it would be better, at least for the C parts of the > patch below, to have a function to do the job, and call it from each > of the few places which I identified. [...] > --- module/ice-9/boot-9.scm~ 2014-02-15 01:00:33 +0200 > +++ module/ice-9/boot-9.scm 2014-06-29 18:15:07 +0300 > @@ -1657,7 +1657,7 @@ > (or (char=3D? c #\/) > (char=3D? c #\\))) >=20=20 > - (define file-name-separator-string "\\") > + (define file-name-separator-string "/") >=20=20 > (define (absolute-file-name? file-name) > (define (file-name-separator-at-index? idx) That looks good to me, but I=E2=80=99m Windows-oblivious ;-) and I=E2=80=99= d like to hear what Andy thinks, because he did the UNC thing in the past. Andy? Ludo=E2=80=99.