From d274f83381976a9fb9204fdcd7496d34b4441e57 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Fri, 1 Mar 2013 21:19:41 +0000 Subject: [PATCH] Adds the (somewhat silly) _CS_V[67]_ENV and _CS_POSIX_V[67]_* defines to and confstr(3) per POSIX 1003.1-2008 Change confstr(_CS_PATH) to operate directly instead of calling sysctl(3) ports build tested by espie@ --- src/include/unistd.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/include/unistd.h b/src/include/unistd.h index 6609fbcf..53026a7b 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unistd.h,v 1.74 2012/12/05 23:19:57 deraadt Exp $ */ +/* $OpenBSD: unistd.h,v 1.75 2013/03/01 21:19:41 guenther Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- @@ -282,7 +282,38 @@ #define _SC_NPROCESSORS_ONLN 503 /* configurable system strings */ -#define _CS_PATH 1 +#define _CS_PATH 1 +#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 +#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 +#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 +#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 +#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 +#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 +#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 +#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 +#define _CS_POSIX_V6_LP64_OFF64_LIBS 10 +#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 +#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 +#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 +#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 +#define _CS_V6_ENV 15 +#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 16 +#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 17 +#define _CS_POSIX_V7_ILP32_OFF32_LIBS 18 +#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 19 +#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 20 +#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 21 +#define _CS_POSIX_V7_LP64_OFF64_CFLAGS 22 +#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 23 +#define _CS_POSIX_V7_LP64_OFF64_LIBS 24 +#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 25 +#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 26 +#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 27 +#define _CS_POSIX_V7_THREADS_CFLAGS 28 +#define _CS_POSIX_V7_THREADS_LDFLAGS 29 +#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 30 +#define _CS_V7_ENV 31 + #ifndef NULL #ifdef __GNUG__