2012-11-17 09:49:19 +08:00
|
|
|
/* Handle POSIX compilation environments that may or may not be present.
|
2021-01-03 03:32:25 +08:00
|
|
|
Copyright (C) 2012-2021 Free Software Foundation, Inc.
|
2012-11-17 09:49:19 +08:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 13:40:42 +08:00
|
|
|
<https://www.gnu.org/licenses/>. */
|
2012-11-17 09:49:19 +08:00
|
|
|
|
|
|
|
/* Before including this file, the including file must have included
|
|
|
|
<bits/environments.h> (generally via <unistd.h>) and must have
|
|
|
|
defined the following macros, exactly one of which will be called
|
|
|
|
for each POSIX environment:
|
|
|
|
|
|
|
|
KNOWN_PRESENT_ENVIRONMENT, for POSIX environments that are known to
|
|
|
|
be supported in this libc.
|
|
|
|
|
|
|
|
KNOWN_ABSENT_ENVIRONMENT, for POSIX environments that are known not
|
|
|
|
to be supported on this system.
|
|
|
|
|
|
|
|
UNKNOWN_ENVIRONMENT, for POSIX environments not supported in this
|
|
|
|
libc but possibly supported by another libc on the same system,
|
|
|
|
that can be selected using the same compiler but different
|
|
|
|
compilation options.
|
|
|
|
|
|
|
|
Each macro has arguments (SC_PREFIX, ENV_PREFIX, SUFFIX). The
|
|
|
|
corresponding argument to sysconf is _SC_##SC_PREFIX##_##SUFFIX.
|
|
|
|
The environment name, as used with getconf, is
|
|
|
|
ENV_PREFIX##_##SUFFIX, and the corresponding macro is the same with
|
|
|
|
a leading "_".
|
|
|
|
|
|
|
|
In addition, the macros START_ENV_GROUP and END_ENV_GROUP must be
|
|
|
|
defined. These are called with arguments V5, V6, V7 before and
|
|
|
|
after the relevant groups of environments. */
|
|
|
|
|
2014-12-29 20:10:47 +08:00
|
|
|
#define NEED_SPEC_ARRAY 0
|
2014-12-29 20:07:54 +08:00
|
|
|
#include <posix-conf-vars.h>
|
|
|
|
|
2012-11-17 09:49:19 +08:00
|
|
|
START_ENV_GROUP (V7)
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V7_ILP32_OFF32)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V7_ILP32_OFF32)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V7, POSIX_V7, ILP32_OFF32)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V7_ILP32_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V7_ILP32_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V7, POSIX_V7, ILP32_OFFBIG)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V7_LP64_OFF64)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V7_LP64_OFF64)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V7, POSIX_V7, LP64_OFF64)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V7_LPBIG_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V7_LPBIG_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V7, POSIX_V7, LPBIG_OFFBIG)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
END_ENV_GROUP (V7)
|
|
|
|
|
|
|
|
START_ENV_GROUP (V6)
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V6_ILP32_OFF32)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V6_ILP32_OFF32)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V6, POSIX_V6, ILP32_OFF32)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V6_ILP32_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V6_ILP32_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V6, POSIX_V6, ILP32_OFFBIG)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V6_LP64_OFF64)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V6_LP64_OFF64)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V6, POSIX_V6, LP64_OFF64)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_POSIX_V6_LPBIG_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_POSIX_V6_LPBIG_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (V6, POSIX_V6, LPBIG_OFFBIG)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
END_ENV_GROUP (V6)
|
|
|
|
|
|
|
|
START_ENV_GROUP (V5)
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_XBS5_ILP32_OFF32)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_XBS5_ILP32_OFF32)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (XBS5, XBS5, ILP32_OFF32)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_XBS5_ILP32_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_XBS5_ILP32_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (XBS5, XBS5, ILP32_OFFBIG)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_XBS5_LP64_OFF64)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_XBS5_LP64_OFF64)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (XBS5, XBS5, LP64_OFF64)
|
|
|
|
#endif
|
|
|
|
|
2014-12-29 20:07:54 +08:00
|
|
|
#if CONF_IS_DEFINED_SET (_XBS5_LPBIG_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_PRESENT_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
|
2014-12-29 20:07:54 +08:00
|
|
|
#elif CONF_IS_DEFINED (_XBS5_LPBIG_OFFBIG)
|
2012-11-17 09:49:19 +08:00
|
|
|
KNOWN_ABSENT_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
|
|
|
|
#else
|
|
|
|
UNKNOWN_ENVIRONMENT (XBS5, XBS5, LPBIG_OFFBIG)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
END_ENV_GROUP (V5)
|