features.h
Andreas Jaeger
aj@suse.de
Wed Feb 2 09:29:00 GMT 2000
>>>>> Stepan Kasal writes:
> Hallo,
> I've found this: with -D_XOPEN_SOURCE the M_PI & friends are defined
> in math.h. With -D_XOPEN_SOURCE_EXTENDED these are not defined.
> This is counterintuitive: one would expect that _XOPEN_SOURCE is subset
> of _XOPEN_SOURCE_EXTENDED . In other words, I'd expect that __USE_XOPEN
> will be defined under -D_XOPEN_SOURCE_EXTENDED .
> I'd expect somethig like the code below to be in features.h .
> Sorry if this isn't mistake but necessary feature and I only waste your time.
> Stepan
Hi Stepan,
the glibc manual has:
- Macro: _XOPEN_SOURCE
- Macro: _XOPEN_SOURCE_EXTENDED
If you define this macro, functionality described in the X/Open
Portability Guide is included. This is a superset of the POSIX.1
and POSIX.2 functionality and in fact `_POSIX_SOURCE' and
`_POSIX_C_SOURCE' are automatically defined.
As the unification of all Unices, functionality only available in
BSD and SVID is also included.
If the macro `_XOPEN_SOURCE_EXTENDED' is also defined, even more
functionality is available. The extra functions will make all
functions available which are necessary for the X/Open Unix brand.
If the macro `_XOPEN_SOURCE' has the value 500 this includes all
functionality described so far plus some new definitions from the
Single Unix Specification, version 2.
Please note the "is also defined" for _XOPEN_SOURCE_EXTENDED.
If the documentation in <features.h> is not clear, feel free to update
the documentation. The code itself is correct and your patch is not
needed.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
More information about the Libc-alpha
mailing list