-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
#define NEED_SPEC_ARRAY 1
#include <posix-conf-vars.h>
+/* If all of the environments are defined in environments.h, then we don't need
+ to bother with doing a runtime check for a specific environment. */
+#if (defined _SC_V6_ILP32_OFF32 \
+ && defined _SC_V7_LPBIG_OFFBIG \
+ && defined _SC_XBS5_LP64_OFF64 \
+ && defined _SC_V6_LP64_OFF64 \
+ && defined _SC_V7_ILP32_OFFBIG \
+ && defined _SC_V6_LPBIG_OFFBIG \
+ && defined _SC_V7_LP64_OFF64 \
+ && defined _SC_V7_ILP32_OFF32 \
+ && defined _SC_XBS5_LPBIG_OFFBIG \
+ && defined _SC_XBS5_ILP32_OFFBIG \
+ && defined _SC_V6_ILP32_OFFBIG \
+ && defined _SC_XBS5_ILP32_OFF32)
+# define ALL_ENVIRONMENTS_DEFINED 1
+#endif
+
struct conf
{
const char *name;
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2015");
+"), "2018");
printf (gettext ("Written by %s.\n"), "Roland McGrath");
return 0;
}
return 0;
}
+#ifdef ALL_ENVIRONMENTS_DEFINED
+ if (argc > 1 && strncmp (argv[1], "-v", 2) == 0)
+ {
+ if (argv[1][2] == '\0')
+ {
+ if (argc < 3)
+ usage ();
+
+ argv += 2;
+ argc -= 2;
+ }
+ else
+ {
+ argv += 1;
+ argc += 1;
+ }
+ }
+#else
const char *getconf_dir = getenv ("GETCONF_DIR") ?: GETCONF_DIR;
size_t getconf_dirlen = strlen (getconf_dir);
switch (specs[i].num)
{
-#ifndef _XBS5_ILP32_OFF32
+# ifndef _XBS5_ILP32_OFF32
case _SC_XBS5_ILP32_OFF32:
-#endif
-#ifndef _XBS5_ILP32_OFFBIG
+# endif
+# ifndef _XBS5_ILP32_OFFBIG
case _SC_XBS5_ILP32_OFFBIG:
-#endif
-#ifndef _XBS5_LP64_OFF64
+# endif
+# ifndef _XBS5_LP64_OFF64
case _SC_XBS5_LP64_OFF64:
-#endif
-#ifndef _XBS5_LPBIG_OFFBIG
+# endif
+# ifndef _XBS5_LPBIG_OFFBIG
case _SC_XBS5_LPBIG_OFFBIG:
-#endif
-#ifndef _POSIX_V6_ILP32_OFF32
+# endif
+# ifndef _POSIX_V6_ILP32_OFF32
case _SC_V6_ILP32_OFF32:
-#endif
-#ifndef _POSIX_V6_ILP32_OFFBIG
+# endif
+# ifndef _POSIX_V6_ILP32_OFFBIG
case _SC_V6_ILP32_OFFBIG:
-#endif
-#ifndef _POSIX_V6_LP64_OFF64
+# endif
+# ifndef _POSIX_V6_LP64_OFF64
case _SC_V6_LP64_OFF64:
-#endif
-#ifndef _POSIX_V6_LPBIG_OFFBIG
+# endif
+# ifndef _POSIX_V6_LPBIG_OFFBIG
case _SC_V6_LPBIG_OFFBIG:
-#endif
-#ifndef _POSIX_V7_ILP32_OFF32
+# endif
+# ifndef _POSIX_V7_ILP32_OFF32
case _SC_V7_ILP32_OFF32:
-#endif
-#ifndef _POSIX_V7_ILP32_OFFBIG
+# endif
+# ifndef _POSIX_V7_ILP32_OFFBIG
case _SC_V7_ILP32_OFFBIG:
-#endif
-#ifndef _POSIX_V7_LP64_OFF64
+# endif
+# ifndef _POSIX_V7_LP64_OFF64
case _SC_V7_LP64_OFF64:
-#endif
-#ifndef _POSIX_V7_LPBIG_OFFBIG
+# endif
+# ifndef _POSIX_V7_LPBIG_OFFBIG
case _SC_V7_LPBIG_OFFBIG:
-#endif
+# endif
{
const char *args[argc + 3];
size_t spec_len = strlen (spec);
break;
}
}
+#endif
if (argc > 1 && strcmp (argv[1], "-a") == 0)
{