From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7085 invoked by alias); 13 Aug 2011 10:11:34 -0000 Received: (qmail 7076 invoked by uid 22791); 13 Aug 2011 10:11:33 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Aug 2011 10:11:11 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [IPv6:2001:660:2402::186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p7DAAvS9097705 ; Sat, 13 Aug 2011 12:10:57 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [130.79.204.11]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p7DAAupU058722 ; Sat, 13 Aug 2011 12:10:56 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p7DAAsV3091654 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Sat, 13 Aug 2011 12:10:55 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" , "'Tom Tromey'" Cc: References: <004901cc5907$85006320$8f012960$%muller@ics-cnrs.unistra.fr> <83vcu2wnvj.fsf@gnu.org> <83sjp6wmhb.fsf@gnu.org> In-Reply-To: <83sjp6wmhb.fsf@gnu.org> Subject: RE: [RFC] Fix problems related to Mingw/DJGPP file names containing colons Date: Sat, 13 Aug 2011 10:11:00 -0000 Message-ID: <003c01cc59a1$49cc1520$dd643f60$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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-08/txt/msg00269.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: vendredi 12 ao=FBt 2011 19:47 > =C0=A0: Tom Tromey > Cc=A0: pierre.muller@ics-cnrs.unistra.fr; gdb-patches@sourceware.org > Objet=A0: Re: [RFC] Fix problems related to Mingw/DJGPP file names containing > colons >=20 > > From: Tom Tromey > > Cc: Pierre Muller , > > gdb-patches@sourceware.org > > Date: Fri, 12 Aug 2011 11:24:56 -0600 > > > > Eli> Thanks for working on this, but I don't like the idea of quoting file > > Eli> names internally just to work around this problem. > > > > Why? >=20 > It's ugly and fragile, because the original name could be quoted. + /* Quote filenames containing ':' characters to avoid problems. */ + if (strchr (filename, ':') !=3D NULL && filename[0] !=3D '"') + sprintf (canonical_name, "\"%s\":%d", filename, sal->line); The second condition already takes care of not quoting already quoted file names. Regarding the reverting of=20 As Keith said, I can solve this problem only by revert this change: ------------------------------ if (!*p || p[0] =3D=3D '\t' - || ((p[0] =3D=3D ':') - && ((p[1] =3D=3D ':') || (strchr (p + 1, ':') =3D=3D NULL))) + || (p[0] =3D=3D ':') This probably creates problems with some C++=20 cases that use '::' patterns, no? Pierre