about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-02-07 08:19:29 +0000
committerUlrich Drepper <drepper@redhat.com>2009-02-07 08:19:29 +0000
commit26b62243eed34c3ce43da0ea9e469ecc38a73968 (patch)
treefc6a01de2386c131c4f96cad17ec877d2df4bf53 /posix
parent962edb7e689847d5eb9b94a351fd0457994227f0 (diff)
downloadglibc-26b62243eed34c3ce43da0ea9e469ecc38a73968.tar.gz
glibc-26b62243eed34c3ce43da0ea9e469ecc38a73968.tar.xz
glibc-26b62243eed34c3ce43da0ea9e469ecc38a73968.zip
[BZ #7095]
2009-02-06  Ulrich Drepper  <drepper@redhat.com>
	[BZ #7095]
	* bits/confname.h: Add SUSv7 macros for getconf environments.
	* bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/environments.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/environments.h: Likewise.
	* posix/confstr.c: Handle SUSv5 and SUSv7 environments.
	* posix/getconf.c: Likewise.
	* posix/sysconf.c: Likewise.
	* sysdeps/posix/sysconf.c: Likewise.
	* posix/Makefile (getconf.speclist): Also collect SUSv5 and SUSv7
	environments.
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile8
-rw-r--r--posix/confstr.c182
-rw-r--r--posix/getconf.c111
-rw-r--r--posix/sysconf.c12
4 files changed, 288 insertions, 25 deletions
diff --git a/posix/Makefile b/posix/Makefile
index c904636411..d9a1ac768f 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-1999, 2000-2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-1999, 2000-2006, 2007, 2009 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -304,7 +304,11 @@ $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
 $(objpfx)getconf.speclist: $(objpfx)getconf
 ifeq (no,$(cross-compiling))
 	LC_ALL=C GETCONF_DIR=/dev/null \
-	$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
+	$(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
+	LC_ALL=C GETCONF_DIR=/dev/null \
+	$(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
+	LC_ALL=C GETCONF_DIR=/dev/null \
+	$(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
 else
 	> $@.new
 endif
diff --git a/posix/confstr.c b/posix/confstr.c
index 26b0fa875b..9aa4b5aebb 100644
--- a/posix/confstr.c
+++ b/posix/confstr.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997, 2000-2002, 2003, 2004
-   Free Software Foundation, Inc.
+/* Copyright (C) 1991,1996,1997,2000-2004,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -46,6 +45,69 @@ confstr (name, buf, len)
       }
       break;
 
+    case _CS_V7_WIDTH_RESTRICTED_ENVS:
+      /* We have to return a newline-separated list of named of
+	 programming environements in which the widths of blksize_t,
+	 cc_t, mode_t, nfds_t, pid_t, ptrdiff_t, size_t, speed_t,
+	 ssize_t, suseconds_t, tcflag_t, useconds_t, wchar_t, and
+	 wint_t types are no greater than the width of type long.
+
+	 Currently this means all environment which the system allows.  */
+      {
+	char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
+
+	string_len = 0;
+#ifndef _POSIX_V7_ILP32_OFF32
+        if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
+#endif
+#if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0
+          {
+            memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
+                    sizeof "POSIX_V7_ILP32_OFF32" - 1);
+            string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
+          }
+#endif
+#ifndef _POSIX_V7_ILP32_OFFBIG
+        if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
+#endif
+#if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0
+          {
+            if (string_len)
+              restenvs[string_len++] = '\n';
+            memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
+                    sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
+            string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
+          }
+#endif
+#ifndef _POSIX_V7_LP64_OFF64
+        if (__sysconf (_SC_V7_LP64_OFF64) > 0)
+#endif
+#if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0
+          {
+            if (string_len)
+              restenvs[string_len++] = '\n';
+            memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
+                    sizeof "POSIX_V7_LP64_OFF64" - 1);
+            string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
+          }
+#endif
+#ifndef _POSIX_V7_LPBIG_OFFBIG
+        if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
+#endif
+#if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0
+          {
+            if (string_len)
+              restenvs[string_len++] = '\n';
+            memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
+                    sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
+            string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
+          }
+#endif
+        restenvs[string_len++] = '\0';
+	string = restenvs;
+      }
+      break;
+
     case _CS_V6_WIDTH_RESTRICTED_ENVS:
       /* We have to return a newline-separated list of named of
 	 programming environements in which the widths of blksize_t,
@@ -109,13 +171,77 @@ confstr (name, buf, len)
       }
       break;
 
+    case _CS_V5_WIDTH_RESTRICTED_ENVS:
+      /* We have to return a newline-separated list of named of
+	 programming environements in which the widths of blksize_t,
+	 cc_t, mode_t, nfds_t, pid_t, ptrdiff_t, size_t, speed_t,
+	 ssize_t, suseconds_t, tcflag_t, useconds_t, wchar_t, and
+	 wint_t types are no greater than the width of type long.
+
+	 Currently this means all environment which the system allows.  */
+      {
+	char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"];
+
+	string_len = 0;
+#ifndef _XBS5_ILP32_OFF32
+        if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
+#endif
+#if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0
+          {
+            memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
+                    sizeof "XBS5_ILP32_OFF32" - 1);
+            string_len += sizeof "XBS5_ILP32_OFF32" - 1;
+          }
+#endif
+#ifndef _XBS5_ILP32_OFFBIG
+        if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
+#endif
+#if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0
+          {
+            if (string_len)
+              restenvs[string_len++] = '\n';
+            memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
+                    sizeof "XBS5_ILP32_OFFBIG" - 1);
+            string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
+          }
+#endif
+#ifndef _XBS5_LP64_OFF64
+        if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
+#endif
+#if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0
+          {
+            if (string_len)
+              restenvs[string_len++] = '\n';
+            memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
+                    sizeof "XBS5_LP64_OFF64" - 1);
+            string_len += sizeof "XBS5_LP64_OFF64" - 1;
+          }
+#endif
+#ifndef _XBS5_LPBIG_OFFBIG
+        if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
+#endif
+#if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0
+          {
+            if (string_len)
+              restenvs[string_len++] = '\n';
+            memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
+                    sizeof "XBS5_LPBIG_OFFBIG" - 1);
+            string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
+          }
+#endif
+        restenvs[string_len++] = '\0';
+	string = restenvs;
+      }
+      break;
+
     case _CS_XBS5_ILP32_OFF32_CFLAGS:
     case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+    case _CS_POSIX_V7_ILP32_OFF32_CFLAGS:
 #ifdef __ILP32_OFF32_CFLAGS
-# if _POSIX_V6_ILP32_OFF32 == -1
+# if _POSIX_V7_ILP32_OFF32 == -1
 #  error "__ILP32_OFF32_CFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFF32
-      if (__sysconf (_SC_V6_ILP32_OFF32) < 0)
+# elif !defined _POSIX_V7_ILP32_OFF32
+      if (__sysconf (_SC_V7_ILP32_OFF32) < 0)
         break;
 # endif
       string = __ILP32_OFF32_CFLAGS;
@@ -125,11 +251,12 @@ confstr (name, buf, len)
 
     case _CS_XBS5_ILP32_OFFBIG_CFLAGS:
     case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+    case _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS:
 #ifdef __ILP32_OFFBIG_CFLAGS
-# if _POSIX_V6_ILP32_OFFBIG == -1
+# if _POSIX_V7_ILP32_OFFBIG == -1
 #  error "__ILP32_OFFBIG_CFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFFBIG
-      if (__sysconf (_SC_V6_ILP32_OFFBIG) < 0)
+# elif !defined _POSIX_V7_ILP32_OFFBIG
+      if (__sysconf (_SC_V7_ILP32_OFFBIG) < 0)
         break;
 # endif
       string = __ILP32_OFFBIG_CFLAGS;
@@ -139,11 +266,12 @@ confstr (name, buf, len)
 
     case _CS_XBS5_LP64_OFF64_CFLAGS:
     case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
+    case _CS_POSIX_V7_LP64_OFF64_CFLAGS:
 #ifdef __LP64_OFF64_CFLAGS
-# if _POSIX_V6_LP64_OFF64 == -1
+# if _POSIX_V7_LP64_OFF64 == -1
 #  error "__LP64_OFF64_CFLAGS should not be defined"
-# elif !defined _POSIX_V6_LP64_OFF64
-      if (__sysconf (_SC_V6_LP64_OFF64) < 0)
+# elif !defined _POSIX_V7_LP64_OFF64
+      if (__sysconf (_SC_V7_LP64_OFF64) < 0)
         break;
 # endif
       string = __LP64_OFF64_CFLAGS;
@@ -153,11 +281,12 @@ confstr (name, buf, len)
 
     case _CS_XBS5_ILP32_OFF32_LDFLAGS:
     case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+    case _CS_POSIX_V7_ILP32_OFF32_LDFLAGS:
 #ifdef __ILP32_OFF32_LDFLAGS
-# if _POSIX_V6_ILP32_OFF32 == -1
+# if _POSIX_V7_ILP32_OFF32 == -1
 #  error "__ILP32_OFF32_LDFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFF32
-      if (__sysconf (_SC_V6_ILP32_OFF32) < 0)
+# elif !defined _POSIX_V7_ILP32_OFF32
+      if (__sysconf (_SC_V7_ILP32_OFF32) < 0)
         break;
 # endif
       string = __ILP32_OFF32_LDFLAGS;
@@ -167,11 +296,12 @@ confstr (name, buf, len)
 
     case _CS_XBS5_ILP32_OFFBIG_LDFLAGS:
     case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+    case _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS:
 #ifdef __ILP32_OFFBIG_LDFLAGS
-# if _POSIX_V6_ILP32_OFFBIG == -1
+# if _POSIX_V7_ILP32_OFFBIG == -1
 #  error "__ILP32_OFFBIG_LDFLAGS should not be defined"
-# elif !defined _POSIX_V6_ILP32_OFFBIG
-      if (__sysconf (_SC_V6_ILP32_OFFBIG) < 0)
+# elif !defined _POSIX_V7_ILP32_OFFBIG
+      if (__sysconf (_SC_V7_ILP32_OFFBIG) < 0)
         break;
 # endif
       string = __ILP32_OFFBIG_LDFLAGS;
@@ -181,11 +311,12 @@ confstr (name, buf, len)
 
     case _CS_XBS5_LP64_OFF64_LDFLAGS:
     case _CS_POSIX_V6_LP64_OFF64_LDFLAGS:
+    case _CS_POSIX_V7_LP64_OFF64_LDFLAGS:
 #ifdef __LP64_OFF64_LDFLAGS
-# if _POSIX_V6_LP64_OFF64 == -1
+# if _POSIX_V7_LP64_OFF64 == -1
 #  error "__LP64_OFF64_LDFLAGS should not be defined"
-# elif !defined _POSIX_V6_LP64_OFF64
-      if (__sysconf (_SC_V6_LP64_OFF64) < 0)
+# elif !defined _POSIX_V7_LP64_OFF64
+      if (__sysconf (_SC_V7_LP64_OFF64) < 0)
         break;
 # endif
       string = __LP64_OFF64_LDFLAGS;
@@ -241,6 +372,17 @@ confstr (name, buf, len)
     case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
     case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
     case _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS:
+
+    case _CS_POSIX_V7_ILP32_OFF32_LIBS:
+    case _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS:
+    case _CS_POSIX_V7_ILP32_OFFBIG_LIBS:
+    case _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS:
+    case _CS_POSIX_V7_LP64_OFF64_LIBS:
+    case _CS_POSIX_V7_LP64_OFF64_LINTFLAGS:
+    case _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS:
+    case _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS:
+    case _CS_POSIX_V7_LPBIG_OFFBIG_LIBS:
+    case _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS:
       /* GNU libc does not require special actions to use LFS functions.  */
       break;
 
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);
diff --git a/posix/sysconf.c b/posix/sysconf.c
index f22685cb29..971dd8bf77 100644
--- a/posix/sysconf.c
+++ b/posix/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1993,1995-1997,2001,2002,2003
+/* Copyright (C) 1991,1993,1995-1997,2001,2002,2003,2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -255,6 +255,16 @@ __sysconf (name)
     case _SC_XBS5_LP64_OFF64:
     case _SC_XBS5_LPBIG_OFFBIG:
 
+    case _SC_POSIX_V6_ILP32_OFF32:
+    case _SC_POSIX_V6_ILP32_OFFBIG:
+    case _SC_POSIX_V6_LP64_OFF64:
+    case _SC_POSIX_V6_LPBIG_OFFBIG:
+
+    case _SC_POSIX_V7_ILP32_OFF32:
+    case _SC_POSIX_V7_ILP32_OFFBIG:
+    case _SC_POSIX_V7_LP64_OFF64:
+    case _SC_POSIX_V7_LPBIG_OFFBIG:
+
     case _SC_XOPEN_LEGACY:
     case _SC_XOPEN_REALTIME:
     case _SC_XOPEN_REALTIME_THREADS: