aboutsummaryrefslogtreecommitdiff
path: root/posix/getconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/getconf.c')
-rw-r--r--posix/getconf.c111
1 files changed, 109 insertions, 2 deletions
diff --git a/posix/getconf.c b/posix/getconf.c
index 1b5f6bc2b7..2b1f6c9871 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -528,6 +528,11 @@ static const struct conf vars[] =
#endif
/* Programming environments. */
+#ifdef _CS_V5_WIDTH_RESTRICTED_ENVS
+ { "_XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS, CONFSTR },
+ { "XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS, CONFSTR },
+#endif
+
#ifdef _SC_XBS5_ILP32_OFF32
{ "_XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32, SYSCONF },
#endif
@@ -661,6 +666,75 @@ static const struct conf vars[] =
{ "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, CONFSTR },
#endif
+#ifdef _SC_V7_ILP32_OFF32
+ { "_POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_CFLAGS
+ { "POSIX_V7_ILP32_OFF32_CFLAGS", _CS_POSIX_V7_ILP32_OFF32_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
+ { "POSIX_V7_ILP32_OFF32_LDFLAGS", _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_LIBS
+ { "POSIX_V7_ILP32_OFF32_LIBS", _CS_POSIX_V7_ILP32_OFF32_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
+ { "POSIX_V7_ILP32_OFF32_LINTFLAGS", _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, CONFSTR },
+#endif
+
+#ifdef _CS_V7_WIDTH_RESTRICTED_ENVS
+ { "_POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS, CONFSTR },
+ { "POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS, CONFSTR },
+#endif
+
+#ifdef _SC_V7_ILP32_OFFBIG
+ { "_POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
+ { "POSIX_V7_ILP32_OFFBIG_CFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
+ { "POSIX_V7_ILP32_OFFBIG_LDFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LIBS
+ { "POSIX_V7_ILP32_OFFBIG_LIBS", _CS_POSIX_V7_ILP32_OFFBIG_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
+ { "POSIX_V7_ILP32_OFFBIG_LINTFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, CONFSTR },
+#endif
+
+#ifdef _SC_V7_LP64_OFF64
+ { "_POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_CFLAGS
+ { "POSIX_V7_LP64_OFF64_CFLAGS", _CS_POSIX_V7_LP64_OFF64_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_LDFLAGS
+ { "POSIX_V7_LP64_OFF64_LDFLAGS", _CS_POSIX_V7_LP64_OFF64_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_LIBS
+ { "POSIX_V7_LP64_OFF64_LIBS", _CS_POSIX_V7_LP64_OFF64_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
+ { "POSIX_V7_LP64_OFF64_LINTFLAGS", _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, CONFSTR },
+#endif
+
+#ifdef _SC_V7_LPBIG_OFFBIG
+ { "_POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG, SYSCONF },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
+ { "POSIX_V7_LPBIG_OFFBIG_CFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
+ { "POSIX_V7_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
+ { "POSIX_V7_LPBIG_OFFBIG_LIBS", _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, CONFSTR },
+#endif
+#ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
+ { "POSIX_V7_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, CONFSTR },
+#endif
+
#ifdef _SC_ADVISORY_INFO
{ "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF },
#endif
@@ -926,12 +1000,20 @@ static const struct conf vars[] =
};
-static struct { const char *name; int num; } specs[] =
+static const struct { const char *name; int num; } specs[] =
{
+ { "XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32 },
+ { "XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG },
+ { "XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64 },
+ { "XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG },
{ "POSIX_V6_ILP32_OFF32", _SC_V6_ILP32_OFF32 },
{ "POSIX_V6_ILP32_OFFBIG", _SC_V6_ILP32_OFFBIG },
{ "POSIX_V6_LP64_OFF64", _SC_V6_LP64_OFF64 },
- { "POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG }
+ { "POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG },
+ { "POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32 },
+ { "POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG },
+ { "POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64 },
+ { "POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG },
};
static const int nspecs = sizeof (specs) / sizeof (specs[0]);
@@ -949,6 +1031,7 @@ usage (void)
exit (2);
}
+
static void
print_all (const char *path)
{
@@ -1082,6 +1165,18 @@ environment SPEC.\n\n"));
switch (specs[i].num)
{
+#ifndef _XBS5_ILP32_OFF32
+ case _SC_XBS5_ILP32_OFF32:
+#endif
+#ifndef _XBS5_ILP32_OFFBIG
+ case _SC_XBS5_ILP32_OFFBIG:
+#endif
+#ifndef _XBS5_LP64_OFF64
+ case _SC_XBS5_LP64_OFF64:
+#endif
+#ifndef _XBS5_LPBIG_OFFBIG
+ case _SC_XBS5_LPBIG_OFFBIG:
+#endif
#ifndef _POSIX_V6_ILP32_OFF32
case _SC_V6_ILP32_OFF32:
#endif
@@ -1094,6 +1189,18 @@ environment SPEC.\n\n"));
#ifndef _POSIX_V6_LPBIG_OFFBIG
case _SC_V6_LPBIG_OFFBIG:
#endif
+#ifndef _POSIX_V7_ILP32_OFF32
+ case _SC_V7_ILP32_OFF32:
+#endif
+#ifndef _POSIX_V7_ILP32_OFFBIG
+ case _SC_V7_ILP32_OFFBIG:
+#endif
+#ifndef _POSIX_V7_LP64_OFF64
+ case _SC_V7_LP64_OFF64:
+#endif
+#ifndef _POSIX_V7_LPBIG_OFFBIG
+ case _SC_V7_LPBIG_OFFBIG:
+#endif
{
const char *args[argc + 3];
size_t spec_len = strlen (spec);