From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6396 invoked by alias); 11 Jul 2006 22:50:26 -0000 Received: (qmail 6387 invoked by uid 22791); 11 Jul 2006 22:50:25 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 11 Jul 2006 22:50:22 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1G0R3b-0000Sy-Bh; Tue, 11 Jul 2006 18:50:19 -0400 Date: Tue, 11 Jul 2006 22:50:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] New substitute-path commands Message-ID: <20060711225019.GB1686@nevyn.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sources.redhat.com References: <20060705215606.GF3580@adacore.com> <20060705230129.GA1145@nevyn.them.org> <20060706044733.GC673@adacore.com> <1152198199.6282.63.camel@dufur.beaverton.ibm.com> <20060706162952.GB24631@nevyn.them.org> <20060707052219.GA971@adacore.com> <20060711124739.GA18324@nevyn.them.org> <20060711222524.GC1262@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060711222524.GC1262@adacore.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00102.txt.bz2 On Tue, Jul 11, 2006 at 03:25:24PM -0700, Joel Brobecker wrote: > > > 2. Should the end of the rule be anchored to end of string or > > directory separator? > > I was thinking about this, and almost ready to implement it. But > then I thought about the Windows case. On cygwin, the directory > separator is '/', but then some tools probably use '\' and we > accept it. On MinGW, the standard directory separator is '\', but > GCC at least uses forward slashes as far as I know. > > So, in implementation terms, anchoring against the directory > separator is tricky on Windows. I think we should accept both. > I'm just not sure what is the best way of implementing this. > Looks like we might not be able to avoid an #ifdef macro. Isn't this just IS_DIR_SEPARATOR ? You probably want to use FILENAME_CMP too. The other question is what to do with "C:" on cygwin/mingw32. I haven't thought about that. I'd feel free to not worry about it, and then if it becomes a problem for someone using Windows they can fix it (which might be me, later - I expect CodeSourcery to want to do the same thing Andrew Stubbs was talking about and set this up to work magically). -- Daniel Jacobowitz CodeSourcery