[1/2] Fix typo in _REGEX_VERSION name
Commit Message
There is no _POSIX_REGEX_VERSION, so don't check for it. Instead
check for what actually exists, which is _REGEX_VERSION. I found this
when trying to make the getconf environment variables typo-proof.
* sysdeps/posix/sysconf.c (__sysconf): Check for and return
_REGEX_VERSION and not _POSIX_REGEX_VERSION.
---
sysdeps/posix/sysconf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
_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.
Thanks,
Roland
@@ -984,8 +984,8 @@ __sysconf (name)
return -1;
#endif
case _SC_REGEX_VERSION:
-#if _POSIX_REGEX_VERSION > 0
- return _POSIX_REGEX_VERSION;
+#ifdef _REGEX_VERSION
+ return _REGEX_VERSION;
#else
return -1;
#endif