Generate /usr/libexec/getconf files when cross-compiling
Joseph S. Myers
joseph@codesourcery.com
Thu Nov 15 20:50:00 GMT 2012
On Thu, 15 Nov 2012, Roland McGrath wrote:
> I'd be more inclined toward:
>
> #if _POSIX_V7_ILP32_OFF32 > 0
> KNOWN_ENVIRONMENT (V7_ILP32_OFF32)
> #else
> UNKNOWN_ENVIRONMENT (V7_ILP32_OFF32)
> #endif
>
> or something like that. Then the definitions of the macros can be
> just magic marker strings for grepping in the build-time case, and
> can be code fragments in the other cases.
The sysconf and confstr cases want to distinguish between three cases
(undefined; defined and positive; defined and not positive), where the
build-time case only wants to distinguish the defined-and-positive case
from the rest. The different patterns for the names for V5 from those for
V6 and V7 (_XBS5_ILP32_OFF32 and _SC_XBS5_ILP32_OFF32;
_POSIX_V7_ILP32_OFF32 and _SC_V7_ILP32_OFF32) also mean you can't just use
single-argument macros like that.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list