From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id 804BF3858D28 for ; Wed, 21 Jun 2023 07:33:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 804BF3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35L7NN2K029664 for ; Wed, 21 Jun 2023 09:33:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=0JRp8lKxIBpzc0+BO3w2E08RnNc9+0fvqGRztp0YLY8=; b=ykbFFAiTJAVr7aH8tN7E3lU+CD8Vq8r/NycO00Mjm0ybYcHolYkCsMU0EZW7HbneRrzv KlNIEwyQooltTTfaxY7QrNSHHd/RcAgytxtirAogjeLwno+62/6m3SQ6vhUNzCCB3GMY jYVP35W+LokUFtYe3jhcA7EKE43YwBpAvsp6/jb4UU6OizzCq0VnNL19LKngaa6AEwyR 2nm/SHmA8VmanVcrm8ISEzUrPRQ4xwXn+pnkrv7kyK211pQ9joZjUo/XeC2lYDY7cGcX z2Clnpc7urjRpMSIZLTrk0tVudonmfsnPCgtWMbljksKNUgbZYpR9Wp+C2oVm9Q6ehG8 KQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rbrtg9gju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Jun 2023 09:33:49 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C06F9100069 for ; Wed, 21 Jun 2023 09:33:48 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 9D75221A220 for ; Wed, 21 Jun 2023 09:33:48 +0200 (CEST) Received: from [10.252.15.158] (10.252.15.158) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 21 Jun 2023 09:33:48 +0200 Message-ID: <2e1320d9-f69f-83d4-2fdf-eff515a4f4f0@foss.st.com> Date: Wed, 21 Jun 2023 09:33:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] Make SIG2STR_MAX usable in #if Content-Language: en-US To: References: From: Torbjorn SVENSSON In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.252.15.158] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-21_05,2023-06-16_01,2023-05-22_02 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,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 List-Id: #if __SIZEOF_INT__ >= 4 -#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("4294967295") - 1) +#define SIG2STR_MAX 21 /* (sizeof("RTMAX+") + sizeof("4294967295") - 1) */ #else -#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("65535") - 1) +#define SIG2STR_MAX 17 /* (sizeof("RTMAX+") + sizeof("65535") - 1) */ #endif I have not read the specification, but how come it's 17 and 21? From what I can tell, "RTMAX+65535" is not 4 shorter than "RTMAX+4294967295". Kind regards, Torbjörn On 2023-06-21 03:22, Mingye Wang wrote: > On Mon, Jun 19, 2023 at 5:00 PM Corinna Vinschen wrote: >> >> We could redefine SIG2STR_MAX as static values (still dependent on >> __SIZEOF_INT__) and prepend the sizeof expressions as comments. >> >> Do you want to provide a patch? > > I guess? See the attached file for an attempt. > > Uh, what license am I supposed to say I am releasing this patch under? > > Sincerely, > Mingye