From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 226BF3858D35 for ; Wed, 21 Jun 2023 09:13:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 226BF3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687338809; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=o5dhze/6/PdsH9RZVvTCOOd2xbTiUG7WWlF5Ivmedw8=; b=hj9cYKa4wveqd4FJ/+KTW4aRFG/8IL7ZO1De20qedm3CVv8Q9ZxX1bhkWx/6Yqql5ncyqy SlrZlgKKoT5uOGCsLV3RhFzumGT4TU+vXQpNPuSB8341sX8ExbU67ugX23aiI3jDrIXtgd VN0bei5IiAZlYkyRgT6AAN5y6YNukGE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-519-1VnoKp02MgCOBsVJATgfxw-1; Wed, 21 Jun 2023 05:13:25 -0400 X-MC-Unique: 1VnoKp02MgCOBsVJATgfxw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C87321C0A580; Wed, 21 Jun 2023 09:13:24 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.195.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A68E6C1ED96; Wed, 21 Jun 2023 09:13:24 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 4898CA80C4C; Wed, 21 Jun 2023 11:13:23 +0200 (CEST) Date: Wed, 21 Jun 2023 11:13:23 +0200 From: Corinna Vinschen To: Torbjorn SVENSSON Cc: Mingye Wang , newlib@sourceware.org Subject: Re: [PATCH] Make SIG2STR_MAX usable in #if Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: Torbjorn SVENSSON , Mingye Wang , newlib@sourceware.org References: <2e1320d9-f69f-83d4-2fdf-eff515a4f4f0@foss.st.com> MIME-Version: 1.0 In-Reply-To: <2e1320d9-f69f-83d4-2fdf-eff515a4f4f0@foss.st.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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: On Jun 21 09:33, Torbjorn SVENSSON wrote: > > #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". That should be 7 + 11 - 1 = 17 and 7 + 6 - 1 = 12, shouldn't it? Corinna