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.133.124]) by sourceware.org (Postfix) with ESMTP id 606E13858018 for ; Fri, 27 Aug 2021 10:16:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 606E13858018 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=1630059361; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=ZgrXo+VheIHAGKe+qDwVeYKJ8uo1UBV+3NJW5WrkwnE=; b=DsSuu4iVXlBicr+MB9vbuVPrRwNRrGFKdd5fAgye1X7gK/FY84Mav4fL6SRpZyCAvlvbUC Hss0ypqCFnQ8Gm+7GXIiaUgF6QaNcIMBeE9htn1CpxtcHFrlYLkl78Nf8N3Lxebiuqf/kG 5zFPPBDjVbzgJUpSgcHAr/ZtBt5FIK8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-eWmlnupQM0WwN0K-5VmLsA-1; Fri, 27 Aug 2021 06:15:59 -0400 X-MC-Unique: eWmlnupQM0WwN0K-5VmLsA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 14BFE190B2A1 for ; Fri, 27 Aug 2021 10:15:59 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-112-2.ams2.redhat.com [10.36.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC5F55D9DC for ; Fri, 27 Aug 2021 10:15:58 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 8DC05A80FAC; Fri, 27 Aug 2021 12:15:57 +0200 (CEST) Date: Fri, 27 Aug 2021 12:15:57 +0200 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: Fw: [PATCH newlib 0/1] sys/signal.h needs sys/_intsup.h Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: <20210825191245.30049-1-joel@rtems.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vinschen@redhat.com 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=-7.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2021 10:16:04 -0000 On Aug 26 18:28, Joel Sherrill wrote: > We recently added this to sys/signal.h: > > #if __STDINT_EXP(INT_MAX) > 0x7fff > #define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("4294967295") - 1) > #else > #define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("65535") - 1) > #endif > > And -ffreestanding breaks that. I see two solutions: > > (1) Add __STDINT_EXP to gcc's stdint-gcc.h > (2) Switch that #if to something else > > I think something like this is an OK substitute works equivalently: > > #if __SIZEOF_INT__ > 2 or even __SIZEOF_INT__ >= 4 to be extra *extra* paranoid, but yeah, sure, go ahead. The commmit message should just briefly explain the freestanding implementation issue. Corinna