From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by sourceware.org (Postfix) with ESMTPS id 958323901F7C for ; Tue, 28 Jun 2022 14:55:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 958323901F7C Received: by mail-qk1-x730.google.com with SMTP id v6so9900468qkh.2 for ; Tue, 28 Jun 2022 07:55:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WmLK4xzQlH+4Ydvmwmv5uLQQC9dEqRt+gdbjUp3++fg=; b=qa1J+Lqo4+IiLKYvGkHZe7V+KA7V7lcvmtq1Z7Pgbsl+zEoW+Nb4sifO9dTT/6yWPV 09R/EVTL5yUu5f1MT1Wv8Z32Fr/gel4WwiGHiEiNHgOj8+J0PyLEH+8YYW7V3XcjtlC8 c3Q2iEcsnK2FB4lswffwtHAMvKwDzM+NKxugzdGYM1ZAu3Lfp9womxF5VGH9UNrEYLSR s4s3ffmauxDR2C4vwPozA3FR5zG3NCeqMyqQNbc+WRVT55XGIcRv5Ytmv6o254bJCeLD yKn2MaugkhgGJbw9zQmNWlw48kmWA5VJvTnVKGPufejM1PJDI3wViLKQS4zA3PmGUdeq TdoQ== X-Gm-Message-State: AJIora8LBU2dxoJeh0SFMKuO1IJ1NJjUICpIzRCR0PWR1L7xrRmD83D8 tZO2w/F4PFSQl8ceuCpc9ozh1wYVPcJu09psWDBVRQ== X-Google-Smtp-Source: AGRyM1s005mP0LiayDHmk7Sg8de5tyF76IYVggS9txdhagSSLvc46FcGbElnCiXULA0a+p6w//IIXMCV8GTgrkhkSGg= X-Received: by 2002:a37:2756:0:b0:6ae:f7c2:ae4a with SMTP id n83-20020a372756000000b006aef7c2ae4amr12182465qkn.504.1656428109868; Tue, 28 Jun 2022 07:55:09 -0700 (PDT) MIME-Version: 1.0 References: <8f8b421d-7cc5-1b4f-7e55-5f4b41716b4c@suse.com> <582cf5fa-766b-9103-35e1-8e40d1acc3f3@suse.com> In-Reply-To: <582cf5fa-766b-9103-35e1-8e40d1acc3f3@suse.com> From: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Date: Tue, 28 Jun 2022 16:55:00 +0200 Message-ID: Subject: Re: [PATCH] windres: add quotes around preprocessor cmd if needed To: Jan Beulich Cc: binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 14:55:12 -0000 On Tue, Jun 28, 2022 at 4:40 PM Jan Beulich wrote: > > On 28.06.2022 16:18, Cl=C3=A9ment Chigot wrote: > > On Tue, Jun 28, 2022 at 3:52 PM Jan Beulich wrote: > >> > >> On 28.06.2022 14:26, Cl=C3=A9ment Chigot wrote: > >>> On Tue, Jun 28, 2022 at 11:37 AM Cl=C3=A9ment Chigot wrote: > >>>> > >>>> On Tue, Jun 28, 2022 at 11:00 AM Jan Beulich wro= te: > >>>>> > >>>>> On 28.06.2022 09:35, Cl=C3=A9ment Chigot via Binutils wrote: > >>>>> Shouldn't you also (optionally) quote the pre-processor string > >>>>> if that came into read_rc_file() as non-NULL? Everything else looks > >>>>> okay to me. > >>>> > >>>> Yeah. I didn't run into this issue but looking at the code it should= happen > >>>> too. Thanks for pointing it out ! > >>> > >>> Actually the space issue is already handled by windres.c: > >>> https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dblob;f=3Dbinutil= s/windres.c;h=3D4df821ee8451bda70490d6626707c2bdd66eeb5f;hb=3DHEAD#l887 > >>> It's not as complete as it should be. But apart of "%" I'm not sure > >>> any other characters caught by "filename_need_quotes" can happen > >>> in a folder name under Windows. > >> > >> Oh, I see. I'm not sure I see a strong need for dealing with %, so > >> I'm wondering: Are you intending to make an updated patch, or do > >> you want to commit the one you've got (which I'm okay with given > >> your observation)? > > > > Honestly, if this patch fits you, I would merge it as is. > > Feel free to commit it then. Committed. Thanks for the review. Cl=C3=A9ment