From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by sourceware.org (Postfix) with ESMTPS id 416D5382FE7C for ; Tue, 28 Jun 2022 12:27:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 416D5382FE7C Received: by mail-qv1-xf2b.google.com with SMTP id y14so19625053qvs.10 for ; Tue, 28 Jun 2022 05:27:09 -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=FA7lelst4LH0oaEYay0ruGMUiDwQPNNRh7AAqko3/d8=; b=acfOFcAKWiZ9b5rMxnN1rDmMEE7UPo8ko1a3wmBHmSY1rfdSO+bz/MMBBQsKj8+ou9 2pQXVw1lr8o0d0C5pfVM/+0kYmPHnF4irQ3V1WXw2W8mWn1ULOhTr852UG9/ynSbxy0M /q8D+blkOqvWFJTwWf9o3wNxCFLjC/sWJhS5Py3ex4J1T3RTvdwkdVg5ef3r4q58Pau7 qXbBlYY4urPk+W8NXD5kQg2S0zSPbjYfJUvi5cK8MoFb8tkjpFTAT73FRyD+bzKUIfjP dCX9PcS3Ywg6OyEAQ05UMZmNqyRJfl+elbIxADU0kceQPzxSdvjEj1d1OyB/bLJGW98v aiZw== X-Gm-Message-State: AJIora+tC/EB+WOLNY9clZWVfqrkXanWATRsifyD479rXkkkfpp53iz4 88mLW+YXJ7S4S8gEpnP7su0T7AgvsrUaOkZ5QJ73qq+j4Rl0aw== X-Google-Smtp-Source: AGRyM1sjvvHf7mydx4SDVL5T3cKjyrWDHZnTZdVNIORHej4vGk+VX5OuBQk28O/q5Br8QaOt8JCtn0qZK5zF8yWIO+Y= X-Received: by 2002:a05:622a:13d1:b0:317:c964:6b1d with SMTP id p17-20020a05622a13d100b00317c9646b1dmr12791578qtk.538.1656419228560; Tue, 28 Jun 2022 05:27:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Date: Tue, 28 Jun 2022 14:26:59 +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 12:27:11 -0000 On Tue, Jun 28, 2022 at 11:37 AM Cl=C3=A9ment Chigot w= rote: > > On Tue, Jun 28, 2022 at 11:00 AM Jan Beulich wrote: > > > > 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 happ= en > 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=3Dbinutils/wind= res.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. Making "filename_need_quotes" more global might be a good idea anyway. Cl=C3=A9ment