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 CD769399C00F for ; Fri, 9 Apr 2021 17:55:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CD769399C00F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yselkowi@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617990911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T91615JQ/4+qcRP2ycg3Z6cZTV0XFJlCL7RUTbjUefg=; b=TUqqWNTUp/4XIFFURRI7lWgAsm7VsdkPSRWlQmb/0OKztw12qGa9IwtGnFR+q1ofcSFXxz 2X1GV9qFF1JNzDYfWHxFjNuueuzzSO6X9Z49MnPiJHmPpiNLxzurJBvo63oZxZLsiouUL2 f+PzkJXeAPczQmkV9qP6hhb+zsMS/a0= 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-154-7tK6C3RBNxidklbYTmhXew-1; Fri, 09 Apr 2021 13:55:07 -0400 X-MC-Unique: 7tK6C3RBNxidklbYTmhXew-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0019F10054F6 for ; Fri, 9 Apr 2021 17:55:06 +0000 (UTC) Received: from yselkowitz.remote.redhat.com (unknown [10.22.9.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A572F6EF51 for ; Fri, 9 Apr 2021 17:55:06 +0000 (UTC) Message-ID: <4277fde8afc20bd75bd9b609242653886bacb73a.camel@redhat.com> Subject: Re: APIs in New POSIX Edition From: Yaakov Selkowitz To: newlib@sourceware.org Date: Fri, 09 Apr 2021 13:55:05 -0400 In-Reply-To: References: User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=yselkowi@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 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_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 09 Apr 2021 17:55:13 -0000 On Thu, 2021-04-08 at 13:49 +0200, Corinna Vinschen wrote: > On Apr  8 06:38, Joel Sherrill wrote: > > On Thu, Apr 8, 2021, 6:19 AM Corinna Vinschen wrote: > > > > > On Apr  7 18:26, Joel Sherrill wrote: > > > > Hi > > > > > > > > https://www.opengroup.org/austin/docs/austin_1110.pdf includes a set of > > > new > > > > methods to be added to the POSIX standard. RTEMS has a potential GSoC > > > > student interested in working down the list for RTEMS. Some of these > > > > make > > > > sense to be implemented in newlib. All will end up being prototyped in > > > > newlib headers somewhere. > > > > > > > > > From the document and the formatting is completely lost. > > > > > > > >  The additional APIs proposed by participants in the Austin Group that > > > The > > > > Open Group has agreed to sponsor are as follows: > > > > > > > getentropy() > > > > memmem() > > > > reallocarray() > > > > strlcat() > > > > strlcpy() > > > > wcslcat() > > > > wcslcpy() > > > > > > Already in newlib. > > > > > > > ppoll() > > > > > > Already defined in Cygwin.  We don't have a generic poll.h header in > > > newlib. > > > > > > > dladdr() > > > > > > Already defined in Cygwin.  We don't have a generic dlfcn.h header in > > > newlib.  It's questionable if this really belongs in newlib. > > > > > > > getlocalename_l() > > > > posix_getdents() > > > > sig2str() > > > > str2sig() > > > > > > No worries as soon as the API is stable. > > > > > > > pthread_cond_clockwait() > > > > pthread_mutex_clocklock() > > > > pthread_rwlock_clockrdlock() > > > > pthread_rwlock_clockwrlock() > > > > qsort_r() > > > > sem_clockwait() > > > > > > No worries, these APIs won't change compared to their already > > > existing implementations in GLibc. > > > > > > > Great. > > > > What feature guard should these be behind? Will it change for the ones > > already in place? > > There will be a matching POSIX.1-2021 or so, given by date/month, > with guards along the lines of _POSIX_C_SOURCE >= 202107L. We have to wait and see what value glibc ends up using here: https://sourceware.org/git/?p=glibc.git;a=blob;f=include/features.h;hb=HEAD > APIS we already have should keep their current guard or'ed with > the above _POSIX_C_SOURCE test. _POSIX_C_SOURCE is only externally facing, function guards will use (__POSIX_VISIBLE >= YYYYMM). > APIs we already have but have no guard should get _DEFAULT_SOURCE > or'ed with the above _POSIX_C_SOURCE test. Let's consider each such case separately. > There are also APIs which already exist per an older POSIX version, > but which are not guarded. I. e., the sem_xxx functions manipulating > POSIX semaphores. Those don't need aguard, because they have been > introduced in conjunction with their own header, i. e., semaphore.h. > > In these cases, the already existing ones still don't need a guard, > just APIs added to the header will get the new _POSIX_C_SOURCE test. __POSIX_VISIBLE, but yes. -- Yaakov Selkowitz Senior Software Engineer - Platform Enablement Red Hat, Inc.