* libc/include/sys/features.h: Allow for _XOPEN_SOURCE to have an
empty definition. Also add support for values of 500 or less.
This commit is contained in:
parent
a24d322c76
commit
5e74a46f2f
|
@ -1,3 +1,8 @@
|
|||
2010-03-17 Craig Howland <howland@LGSInnovations.com>
|
||||
|
||||
* libc/include/sys/features.h: Allow for _XOPEN_SOURCE to have an
|
||||
empty definition. Also add support for values of 500 or less.
|
||||
|
||||
2010-03-09 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* libc/posix/telldir.c (dd_loccnt): Change start index to be 1
|
||||
|
|
|
@ -183,13 +183,19 @@ extern "C" {
|
|||
/* Per the permission given in POSIX.1-2008 section 2.2.1, define
|
||||
* _POSIX_C_SOURCE if _XOPEN_SOURCE is defined and _POSIX_C_SOURCE is not.
|
||||
* (_XOPEN_SOURCE indicates that XSI extensions are desired by an application.)
|
||||
* This permission is first granted in 2008, but it is used for 2001, anyway.
|
||||
* This permission is first granted in 2008, but use it for older ones, also.
|
||||
* Allow for _XOPEN_SOURCE to be empty (from the earliest form of it, before it
|
||||
* was required to have specific values).
|
||||
*/
|
||||
#if !defined(_POSIX_C_SOURCE) && defined(_XOPEN_SOURCE)
|
||||
#if _XOPEN_SOURCE == 700 /* POSIX.1-2008 */
|
||||
#if (_XOPEN_SOURCE - 0) == 700 /* POSIX.1-2008 */
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#elif _XOPEN_SOURCE == 600 /* POSIX.1-2001 */
|
||||
#elif (_XOPEN_SOURCE - 0) == 600 /* POSIX.1-2001 or 2004 */
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
#elif (_XOPEN_SOURCE - 0) == 500 /* POSIX.1-1995 */
|
||||
#define _POSIX_C_SOURCE 199506L
|
||||
#elif (_XOPEN_SOURCE - 0) < 500 /* really old */
|
||||
#define _POSIX_C_SOURCE 2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue