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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id C8A0139AE84B for ; Thu, 29 Jul 2021 09:23:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8A0139AE84B 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=1627550602; 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=64/5QZtQ8vzRkmAgXbOQoXA5mqzGMpok3RhW3i9ZAtA=; b=Sxb+jIuqhg9n+iyPhjPbwMq0HiLbWGwhuZgIBNgnd4+a6zDibs5WWzLuoWxAbmIueLVrtp OPFSjcdAfoBZuzsss1B13UGNqkqOKUyd3G3BP4Pc0zSutwx0Ku35sq0wgAV3fxAZZajRe1 44iAM1aQhoRB7t6WSbZwOG4ivkGkQoU= 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-327-j9YhTB4zPP2QJP7NgiVVXg-1; Thu, 29 Jul 2021 05:23:20 -0400 X-MC-Unique: j9YhTB4zPP2QJP7NgiVVXg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE17B10066E5; Thu, 29 Jul 2021 09:23:18 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-112-26.ams2.redhat.com [10.36.112.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 824B8369A; Thu, 29 Jul 2021 09:23:17 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 11B3AA80859; Thu, 29 Jul 2021 11:23:16 +0200 (CEST) Date: Thu, 29 Jul 2021 11:23:16 +0200 From: Corinna Vinschen To: newlib@sourceware.org Cc: C Howland , joel@rtems.org, Brian Inglis , Matt Joyce , Florian Weimer , Adhemerval Zanella Subject: Re: Fw: [PATCH 1/1] libc: Added implementations and prototypes for Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org, C Howland , joel@rtems.org, Brian Inglis , Matt Joyce , Florian Weimer , Adhemerval Zanella References: <20210724083730.16959-1-mfjoyce2004@gmail.com> <20210724083730.16959-2-mfjoyce2004@gmail.com> <57f33efa-2450-ac5c-3ceb-be8beb183ca5@SystematicSw.ab.ca> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.3 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_H3, RCVD_IN_MSPIKE_WL, 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: Thu, 29 Jul 2021 09:23:24 -0000 On Jul 28 15:13, Joel Sherrill wrote: > On Wed, Jul 28, 2021, 2:54 PM C Howland wrote: > > > On Wed, Jul 28, 2021 at 1:46 PM Corinna Vinschen wrote: > > > > On Jul 28 09:25, Brian Inglis wrote: > > > > > On 2021-07-28 03:11, Corinna Vinschen wrote: > > > > > > On Jul 24 10:37, Matt Joyce wrote: > > > > > > > +#if __GNU_VISIBLE > > > > > > > > > > > > I think this needs discussion. The sig2str/str2sig API has not > > been > > > > > > provided yet by GLibC. Using __GNU_VISIBLE in this context looks > > > wrong. > > > > > > What we need, in fact, is a __POSIX_VISIBLE guard, but here's the > > > > > > problem: As far as I can see, the Issue 8 draft does not yet > > define a > > > > > > version number. > > > > > > > > > > > > If anybody has better information or a good idea how to guard this > > > new > > > > > > API in the meantime, I'm all ears. > > > > > > > > > > Current values are: > > > > > > > > > > __POSIX_VISIBLE 199009 > > > > > __POSIX_VISIBLE 199209 > > > > > __POSIX_VISIBLE 199309 > > > > > __POSIX_VISIBLE 199506 > > > > > __POSIX_VISIBLE 200112 > > > > > __POSIX_VISIBLE 200809 > > > > > __POSIX_VISIBLE 201402 Where did you find the latter one? Per the Open Group docs https://pubs.opengroup.org/onlinepubs/9699919799/ the latest valid value for _POSIX_C_SOURCE is still 200809, even with POSIX.1-2017. > > > > > so could use: > > > > > > > > > > __POSIX_VISIBLE >= 202202 /* FIXME when POSIX Issue 8 released */ > > > > [...] > > It really does not matter a whole lot. The gates are only on the function > > prototypes in the header file. It could just use the date of when the file > > is added for the time being, really. > > This isn't a bad idea. > > And similarly we could use May 2021 which is the date on Issue 8 Draft 2. > > To be more gung-ho, something like > > #define POSIX8_RELDATE 202202 // FIXME WHEN REAL RELEASE DATE KNOWN > > could be added to sys/features.h, and then this file could use that. > > features.h will have to be edited when the new POSIX comes out, so just > > place it appropriately to make the need to change it obvious. > > > > I'm for this and use 202105. If a new draft comes out, maybe we bump it. > > Good thoughts Craig! Indeed. However, I discussed this with Florian Weimer (added to CC) from the GLibc team. The conclusion was: - The API is already defined in Solaris: https://docs.oracle.com/cd/E86824_01/html/E54766/str2sig-3c.html Therefore GLibC will use __USE_MISC (equivalent to our __MISC_VISIBLE) as feature test macro. - As soon as POSIX Issue 8 has an identifier, it will be added to the feature test, i. e., something like if defined(__USE_MISC) || defined(__USE_POSIX123456) Ideally we should do the same. So for the time being, let's use #if __MISC_VISIBLE as feature test and add the matching __POSIX_VISIBLE test as soon as the issue 8 value has been published. Is that ok with everyone? Thanks, Corinna