Remove <sys/semaphore.h> so that we have <semaphore.h> only. There is no point for us to go through the kernel for getting at SEM_VALUE_MAX from sysconf(3), so return it directly and remove the associated p1003_1b.sem_value_max sysctl. Beyond that, the kernel didn't need this header. I've found no ports that need it, either. For safety, bump __DragonFly_version anyway.
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>.
Add support for various sysconf(3) / confstr(3) / getconf(1) constants. _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFFBIG _SC_V7_LP64_OFF64 _SC_V7_LPBIG_OFFBIG _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
mqueues: Let the world know we support them. There are two ways to determine whether we support the message passing interface, as described in POSIX 1003.1B standard. The standard way is to use sysconf(3) and the DragonFly-specific way is to check the value of p1003_1b.message_passing sysctl. We make sure that both return consistent results with respect to each other.
"Sync" threading libaries. * Introduce stubs returning error into libc_r for functions which don't exist there, but are there in libthread_xu. * Compile POSIX spinlocks implementation in libthread_xu. * Define _POSIX_BARRIERS and _POSIX_SPIN_LOCKS and modify sysconf(3) accordingly.
Clean up sysconf and associated headers. * Fixes for amd64. * Implement more keys. * Namespace cleanups for the include files. Move definitions that are implemented in userspace from sys/unistd.h to unistd.h. * Try to avoid using sysctl and just provide the constants direct. Obtained-from: FreeBSD