diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-03-24 20:04:36 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-03-24 20:04:36 +0000 |
commit | a256c3fea6da49c8e6f0447fa9bd679ecd950b42 (patch) | |
tree | 4a81a38fa47bade7f174fac3f3110c7dafe1fc05 /lib/libc | |
parent | eb4be0f299bbada159ad1424fb92b1ce34fe6538 (diff) |
sysconf(_SC_SEM_VALUE_MAX) should return SEM_VALUE_MAX, not some
unrelated sysv sem limit. Similarly, sysconf(_SC_SEM_NSEMS_MAX)
should return -1 instead of another sysv sem limit.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/sysconf.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 2998ea2ec7b..f02faa5c01c 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysconf.c,v 1.17 2012/08/29 21:46:29 matthew Exp $ */ +/* $OpenBSD: sysconf.c,v 1.18 2013/03/24 20:04:35 guenther Exp $ */ /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -198,13 +198,9 @@ sysconf(int name) return (value); break; case _SC_SEM_NSEMS_MAX: + return (-1); case _SC_SEM_VALUE_MAX: - mib[0] = CTL_KERN; - mib[1] = KERN_SEMINFO; - mib[2] = name = _SC_SEM_NSEMS_MAX ? - KERN_SEMINFO_SEMMNS : KERN_SEMINFO_SEMVMX; - namelen = 3; - break; + return (SEM_VALUE_MAX); /* Unsorted */ case _SC_HOST_NAME_MAX: |