From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8957 invoked by alias); 22 Mar 2011 18:11:41 -0000 Received: (qmail 8930 invoked by uid 22791); 22 Mar 2011 18:11:38 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-gx0-f169.google.com (HELO mail-gx0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Mar 2011 18:11:30 +0000 Received: by gxk23 with SMTP id 23so3810169gxk.0 for ; Tue, 22 Mar 2011 11:11:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.206.26 with SMTP id i26mr4069234anq.108.1300817488108; Tue, 22 Mar 2011 11:11:28 -0700 (PDT) Received: by 10.100.232.12 with HTTP; Tue, 22 Mar 2011 11:11:28 -0700 (PDT) In-Reply-To: <4D88E3DE.8020704@gmail.com> References: <4D88E3DE.8020704@gmail.com> Date: Tue, 22 Mar 2011 18:24:00 -0000 Message-ID: Subject: Re: RFC: Issue about assumption of DOSish file-system for cygwin From: Kai Tietz To: Dave Korn Cc: GCC Patches , gdb-patches@sourceware.org, Binutils Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg01002.txt.bz2 2011/3/22 Dave Korn : > On 22/03/2011 11:00, Kai Tietz wrote: > >> I noticed this issue while working on those directory-separator thing >> for DOSish file-systems, and somehow this looks odd to me. For some >> reason the filenames.h header assumes for cygwin DOSish file-system, >> but in fact cygwin uses POSIXish file-system. I assume this definition >> was caused by the times cygwin compiler had -mno-cygwin option, but >> well I think we should correct this by following patch. >> Dave, might it be that I am overlooking here something obvious, why >> cygwin should assume DOSish filesystem? > > =A0Cygwin works in mixed mode, it can use both dos and posix paths; it'll= even > preserve them into e.g. things like debug info: > >> $ as C:/hello.s -o C:/hello2.o -g >> >> $ ls C:/hello.s C:/hello2.o -la >> -rw-r--r-- 1 DKAdmin None =A0437 Mar 22 17:56 C:/hello.s >> -rw-r--r-- 1 DKAdmin None 1084 Mar 22 17:57 C:/hello2.o >> >> $ nm C:/hello2.o >> 00000000 b .bss >> 00000000 d .data >> 00000000 r .rdata >> 00000000 N .stab >> 00000000 N .stabstr >> 00000000 t .text >> =A0 =A0 =A0 =A0 =A0U ___main >> 00000000 T _main >> =A0 =A0 =A0 =A0 =A0U _puts >> >> $ objdump -g C:/hello2.o >> >> C:/hello2.o: =A0 =A0 file format pe-i386 >> >> C:/hello.s: >> /* file C:/hello.s line 10 addr 0x0 */ >> /* file C:/hello.s line 11 addr 0x4 */ >> /* file C:/hello.s line 12 addr 0x7 */ >> /* file C:/hello.s line 13 addr 0xa */ >> /* file C:/hello.s line 14 addr 0xb */ >> /* file C:/hello.s line 15 addr 0xd */ >> /* file C:/hello.s line 16 addr 0xe */ >> /* file C:/hello.s line 17 addr 0x11 */ >> /* file C:/hello.s line 18 addr 0x16 */ >> /* file C:/hello.s line 19 addr 0x1d */ >> /* file C:/hello.s line 20 addr 0x22 */ >> /* file C:/hello.s line 21 addr 0x27 */ >> /* file C:/hello.s line 22 addr 0x2a */ >> /* file C:/hello.s line 23 addr 0x2b */ >> /* file C:/hello.s line 24 addr 0x2c */ >> /* file C:/hello.s line 25 addr 0x2f */ >> >> $ as /cygdrive/c/hello.s -o C:/hello3.o -g >> >> $ objdump -g C:/hello3.o >> >> C:/hello3.o: =A0 =A0 file format pe-i386 >> >> /cygdrive/c/hello.s: >> /* file /cygdrive/c/hello.s line 10 addr 0x0 */ >> /* file /cygdrive/c/hello.s line 11 addr 0x4 */ >> /* file /cygdrive/c/hello.s line 12 addr 0x7 */ >> /* file /cygdrive/c/hello.s line 13 addr 0xa */ >> /* file /cygdrive/c/hello.s line 14 addr 0xb */ >> /* file /cygdrive/c/hello.s line 15 addr 0xd */ >> /* file /cygdrive/c/hello.s line 16 addr 0xe */ >> /* file /cygdrive/c/hello.s line 17 addr 0x11 */ >> /* file /cygdrive/c/hello.s line 18 addr 0x16 */ >> /* file /cygdrive/c/hello.s line 19 addr 0x1d */ >> /* file /cygdrive/c/hello.s line 20 addr 0x22 */ >> /* file /cygdrive/c/hello.s line 21 addr 0x27 */ >> /* file /cygdrive/c/hello.s line 22 addr 0x2a */ >> /* file /cygdrive/c/hello.s line 23 addr 0x2b */ >> /* file /cygdrive/c/hello.s line 24 addr 0x2c */ >> /* file /cygdrive/c/hello.s line 25 addr 0x2f */ >> >> $ > > =A0 =A0cheers, > =A0 =A0 =A0DaveK > > Ok, thanks for explaining it. I am just a bit concerned here about the ABSOLUTE path detection. As then for cygwin this will be for UNIXish path never true. So it might be necessary here for cygwin case to allow \|/ and ':/ for absolute path detection. Cheers, Kai