From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4031 invoked by alias); 9 Jun 2012 14:58:54 -0000 Received: (qmail 4022 invoked by uid 22791); 9 Jun 2012 14:58:53 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Jun 2012 14:58:39 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M5C00300UQ89Q00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sat, 09 Jun 2012 17:58:32 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M5C002YNUXJZ350@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sat, 09 Jun 2012 17:58:32 +0300 (IDT) Date: Sat, 09 Jun 2012 14:58:00 -0000 From: Eli Zaretskii Subject: Re: Quotes after --args In-reply-to: <83bokstv04.fsf@gnu.org> To: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <838vfwttur.fsf@gnu.org> References: <1339164112.4081.ezmlm@sourceware.org> <20120608142102.302310@gmx.net> <833965voww.fsf@gnu.org> <83bokstv04.fsf@gnu.org> 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: 2012-06/txt/msg00264.txt.bz2 > Date: Sat, 09 Jun 2012 17:33:47 +0300 > From: Eli Zaretskii > Cc: bhr2@gmx.de > > Any objections to the patch below, which fixes this problem? (I tried > to minimize uglifying the original sources; if someone sees a better > way, please tell.) > > > 2012-06-09 Eli Zaretskii > > * infcmd.c (construct_inferior_arguments) [__MINGW32__]: Quote > special characters correctly for the Windows shells. See > http://sourceware.org/ml/gdb/2012-06/msg00047.html for the bug > report. > > --- infcmd.c~0 2012-02-23 10:18:38.000000000 +0200 > +++ infcmd.c 2012-06-09 17:20:57.750500000 +0300 > @@ -275,10 +275,18 @@ construct_inferior_arguments (int argc, > > if (STARTUP_WITH_SHELL) > { > +#ifdef __MINGW32__ > + /* This holds all the characters considered special to the > + Windows shells. */ > + char *special = "\"!&*|[]{}<>?`~^=;, \t\n"; > + const char quote = '"'; > +#else > /* This holds all the characters considered special to the > typical Unix shells. We include `^' because the SunOS > /bin/sh treats it as a synonym for `|'. */ > char *special = "\"!#$&*()\\|[]{}<>?'\"`~^; \t\n"; > + const char quote = '\''; > +#endif Btw, any idea why the Unix special characters mention the quote " twice (see above)?