This is the mail archive of the libc-hacker@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: A patch for time/time.h


hjl@lucon.org (H.J. Lu) writes:

> That is fine. But what is the reason behind
> 
> #if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
> # define __USE_POSIX2   1
> #endif
> 
> Why does _POSIX_C_SOURCE >= 2 mean POSIX.2?

I've explained this as well.

The POSIX.1 group hijacked the _POSIX_C_SOURCE macro.  Before they
decided to use it _POSIX_C_SOURCE == 2 meant use POSIX.2 stuff.  But
now _POSIX_C_SOURCE is used with values wil 199506 and if we wouldn't
write the conditional as above POSIX.2 stuff never would be available
at the same time as POSIX.1 stuff.  This is not intended.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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