This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: features.h


>>>>> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]