This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Fix typo in _REGEX_VERSION name

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.


commit 61fe374a44a92621e0b75ec1f011ff1fba6c2148
Author: Siddhesh Poyarekar <>
Date:   Mon Sep 15 10:16:14 2014 +0530

    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

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
 	* posix/getconf.c (vars): Add _POSIX_IPV6 and
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)
       return -1;
+    /* _REGEX_VERSION has been removed with IEEE Std 1003.1-2001/Cor 2-2004,
+       item XSH/TC2/D6/137.  */
     case _SC_REGEX_VERSION:
-      return _POSIX_REGEX_VERSION;
       return -1;
     case _SC_SHELL:
 #if _POSIX_SHELL > 0

Attachment: pgpXY4GyolsGj.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]