From patchwork Mon Sep 15 04:54:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 389202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 60CB01400F1 for ; Mon, 15 Sep 2014 14:54:42 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=sTjX rWpdta4pKwMlfJ/Sv8LpUv4symu+Fu0r7+hjOZmyM7Eo1keyRkLnEJ2etb1barhO T5PmBrFBDKXSkYczH8K9kOIc/yp0je+n9P0HGnTCeyeUnNENXbVb2uUWlHwvdqY2 YxcF2ZMV1K1JwB2tWQ9EsiRiM0MViNApgCdqhEQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=mnNgPp8piV agkE7v94EEOSJGN+U=; b=hzD7vxm4l1N6tzgBsYq67pQ4VTrYd9kcvc3hJsP0cS 4QhBvGXi2ezhFb2YRqeqJdZjenSkfIkHGNmAa1AF8H7cFLQG3KRhV3Q29vkCU5H9 ZSfzdeyHv0D+wud6bwD3zSi2r/oIhtAJUJ2mWSlBWbZ35lMX4Q5DkdaeNsWN4uKR 4= Received: (qmail 7073 invoked by alias); 15 Sep 2014 04:54:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 7064 invoked by uid 89); 15 Sep 2014 04:54:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_50, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Mon, 15 Sep 2014 10:24:26 +0530 From: Siddhesh Poyarekar To: Roland McGrath Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 1/2] Fix typo in _REGEX_VERSION name Message-ID: <20140915045426.GD6586@spoyarek.pnq.redhat.com> References: <20140912111245.GA28267@spoyarek.pnq.redhat.com> <20140912180405.F21122C397F@topped-with-meat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140912180405.F21122C397F@topped-with-meat.com> User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) On Fri, Sep 12, 2014 at 11:04:05AM -0700, Roland McGrath wrote: > _REGEX_VERSION is never defined and in fact it was removed from the > standard. For backward compatibility we must support _SC_REGEX_VERSION and > return -1 without setting errno, but I don't think we should treat this > like the real cases any more. That is, just unconditionally return -1 > and a comment about it having been removed in 1003.1-2004. This is what I have committed. Siddhesh commit 61fe374a44a92621e0b75ec1f011ff1fba6c2148 Author: Siddhesh Poyarekar Date: Mon Sep 15 10:16:14 2014 +0530 Remove _POSIX_REGEX_VERSION There is no _POSIX_REGEX_VERSION, so don't check for it. _REGEX_VERSION has been removed as well[1], so only keep the -1 return for backward compatibility. I found this when trying to make the getconf environment variables typo-proof. * sysdeps/posix/sysconf.c (__sysconf): Return -1 for _SC_REGEX_VERSION. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html diff --git a/ChangeLog b/ChangeLog index d010cc9..e316f8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-09-15 Siddhesh Poyarekar + * sysdeps/posix/sysconf.c (__sysconf): Return -1 for + _SC_REGEX_VERSION. + * posix/getconf.c (vars): Add _POSIX_IPV6 and _POSIX_RAW_SOCKETS. diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c index cd2fb5a..e815cd5 100644 --- a/sysdeps/posix/sysconf.c +++ b/sysdeps/posix/sysconf.c @@ -983,12 +983,10 @@ __sysconf (name) #else return -1; #endif + /* _REGEX_VERSION has been removed with IEEE Std 1003.1-2001/Cor 2-2004, + item XSH/TC2/D6/137. */ case _SC_REGEX_VERSION: -#if _POSIX_REGEX_VERSION > 0 - return _POSIX_REGEX_VERSION; -#else return -1; -#endif case _SC_SHELL: #if _POSIX_SHELL > 0