git: libc/sysconf: Simplify sysconf(_SC_XOPEN_SHM) a bit.

Sascha Wildner swildner at crater.dragonflybsd.org
Sun Oct 25 14:48:20 PDT 2015


commit 2f6482abea88bce07df7c4a5491a44a06ed5e3c7
Author: Sascha Wildner <saw at online.de>
Date:   Sun Oct 25 22:47:18 2015 +0100

    libc/sysconf: Simplify sysconf(_SC_XOPEN_SHM) a bit.
    
    We never had sysv_shm as a module like FreeBSD, only as a kernel
    option (SYSVSHM), which was made a no-op when we started to compile
    it into our kernels by default over a year ago (see 10ceb70237a5).
    
    The sysctl check in the sysconf(3) code was only there to check if
    it was compiled into the kernel or (in FreeBSD's case) if it was
    loaded as a module, when it was still optional.
    
    So the worst thing that could happen after this commit is a wrong
    return value for sysconf(_SC_XOPEN_SHM) if someone was running a
    kernel without "options SYSVSHM" from earlier than July 29, 2014
    in combination with a current world. This all looks quite unlikely,
    so remove the check.
    
    Also, return the right variable from <unistd.h>.

Summary of changes:
 lib/libc/gen/sysconf.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2f6482abea88bce07df7c4a5491a44a06ed5e3c7


-- 
DragonFly BSD source repository


More information about the Commits mailing list