diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2016-06-24 01:58:44 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2016-06-24 02:00:12 +0530 |
commit | d7e64365fea8d9223a233487de1e1d6e3d21c553 (patch) | |
tree | 89d9c80d11b8bf0c240b6aa3a1439e49123f6f6f /posix/getpgid.c | |
parent | db3476aff19b75c4fdefbe65fcd5f0a90588ba51 (diff) | |
download | glibc-d7e64365fea8d9223a233487de1e1d6e3d21c553.tar.gz |
Avoid attempt for runtime checks if all environments are defined
getconf has the capability to do a runtime check for environment
support in cases where there is optional support for an environment
(_POSIX_V7_ILP32_OFF32 on x86_64 for example) and this is indicated by
not defining the _POSIX_V7_ILP32_OFF32 macro, which results in getconf
doing an additional execve of _POSIX_V7_ILP32_OFF32 in the
$GETCONF_DIR.
The default bits/environments.h however does not leave any environment
macros undefined, which means that no such additional execve is
needed. gcc trunk catches this as a build failure since it finds that
the code block inside switch(specs[i].num) is not reachable. Avoid
this error by not bothering about the additional exec (and looking in
specific environments) when all environments are defined.
Tested on aarch64.
* posix/getconf.c: Define ALL_ENVIRONMENTS_DEFINED if all
environment macros are defined.
(main): Avoid execve if ALL_ENVIRONMENTS_DEFINED is defined.
Diffstat (limited to 'posix/getpgid.c')
0 files changed, 0 insertions, 0 deletions