diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-08-23 12:27:09 -0700 |
---|---|---|
committer | Petr Baudis <pasky@suse.cz> | 2009-09-18 17:35:45 +0200 |
commit | 969cfcda4c6ed4a2eda59360946fa7e91883ad59 (patch) | |
tree | 560dbecf1a1f87c7ffc743704c90b2adef272b5a | |
parent | 4701db37e543284856507b521a9f9c4f3d87c482 (diff) |
Define _POSIX_VERSION correctly when older POSIX versions are selected.
(cherry picked from commit c6b6723e6b756d36d9912a1c430459634e15758b)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | posix/unistd.h | 16 |
2 files changed, 20 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2009-08-23 Ulrich Drepper <drepper@redhat.com> + + * posix/unistd.h: Define _POSIX_VERSION correctly if older POSIX + versions are selected. + 2009-08-10 SUGIOKA Toshinobu <sugioka@itonet.co.jp> * stdlib/longlong.h [__sh__] (udiv_qrnnd, sub_ddmmss): Add "t" to diff --git a/posix/unistd.h b/posix/unistd.h index 24ec74e05e..6f92c250ba 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -30,8 +30,22 @@ __BEGIN_DECLS /* These may be used to determine what facilities are present at compile time. Their values can be obtained at run time from `sysconf'. */ +#ifdef __USE_XOPEN2K8 /* POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. */ -#define _POSIX_VERSION 200809L +# define _POSIX_VERSION 200809L +#elif defined __USE_XOPEN2K +/* POSIX Standard approved as ISO/IEC 9945-1 as of December 2001. */ +# define _POSIX_VERSION 200112L +#elif defined __USE_POSIX199506 +/* POSIX Standard approved as ISO/IEC 9945-1 as of June 1995. */ +# define _POSIX_VERSION 199506L +#elif defined __USE_POSIX199309 +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1993. */ +# define _POSIX_VERSION 199309L +#else +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1990. */ +# define _POSIX_VERSION 199009L +#endif /* These are not #ifdef __USE_POSIX2 because they are in the theoretically application-owned namespace. */ |