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 876CD3943540 for ; Thu, 8 Apr 2021 12:07:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 876CD3943540 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vinschen@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617883646; 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=8x0do6RNoOum8QcMAdhMsEEhMvYdVHK1l4YYgZ9TdIw=; b=SaWb4vOXC3AdBLHriRC7YdtSRaEXmj3OcjTrwdDwH+PmLfLx5VWI5qUOrgE7hS0bn/ZHYN mSOm3oLAeZEiMYxC+L44t3WMTMM+fuv4AiOjwXb+19IuIZ9PcYd8ey/vn2FZJbYnvylppZ TyYuO/uUlDPP1o/+2ulHsrtF8q/+L3c= 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-12-KpqUEQGdO0el81X0kFlOiQ-1; Thu, 08 Apr 2021 08:07:24 -0400 X-MC-Unique: KpqUEQGdO0el81X0kFlOiQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D0D64BBEE3 for ; Thu, 8 Apr 2021 12:07:23 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A21595C1C4 for ; Thu, 8 Apr 2021 12:07:23 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 208F4A80E42; Thu, 8 Apr 2021 14:07:22 +0200 (CEST) Date: Thu, 8 Apr 2021 14:07:22 +0200 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: APIs in New POSIX Edition Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.1 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: Thu, 08 Apr 2021 12:07:33 -0000 On Apr 8 13:56, Corinna Vinschen wrote: > On Apr 8 13:49, Corinna Vinschen wrote: > > On Apr 8 06:38, Joel Sherrill wrote: > > > 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. > > > > APIS we already have should keep their current guard or'ed with > > the above _POSIX_C_SOURCE test. > > > > APIs we already have but have no guard should get _DEFAULT_SOURCE > > or'ed with the above _POSIX_C_SOURCE test. > > 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. > > I think... s/_POSIX_C_SOURCE/__POSIX_VISIBLE/ and _DEFAULT_SOURCE is probably not required at all, given it's just current POSIX anyway. We just have to tweka the definition of _DEFAULT_SOURCE to include the latest POSIX. Another one: APIs from this draft already in GlibC and newlib are guarded with __GNU_VISIBLE in newlib (e. g. memmem). We have to change __GNU_VISIBLE to imply the new _POSIX_C_SOURCE setting anyway, so these symbols can be simply guarded with the new __POSIX_VISIBLE guard. I'm sure I still forgot some situation... Corinna