]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Also correct _POSIX2_* constants in case older standards are selected.
authorUlrich Drepper <drepper@redhat.com>
Sun, 23 Aug 2009 21:55:51 +0000 (14:55 -0700)
committerPetr Baudis <pasky@suse.cz>
Fri, 18 Sep 2009 15:40:54 +0000 (17:40 +0200)
(cherry picked from commit bdc7f5d76b4f284475595dddc79f0e0f9720ec20)

ChangeLog
posix/unistd.h

index 6b574a5af94987473feaef7fff10f66122dbead0..e7c80bea1198aff0a40f436110328e63f8b585bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
 
-       * posix/unistd.h: Define _POSIX_VERSION correctly if older POSIX
-       versions are selected.
+       * posix/unistd.h: Define _POSIX_VERSION and _POSIX2_* correctly if
+       older POSIX versions are selected.
 
 2009-08-10  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
 
index 6f92c250ba44a7f4e9fba10b062fd1b4e6c0bde4..a487883eb85267a7d1a4bf900850c8f0785e9ecb 100644 (file)
@@ -50,24 +50,38 @@ __BEGIN_DECLS
 /* These are not #ifdef __USE_POSIX2 because they are
    in the theoretically application-owned namespace.  */
 
+#ifdef __USE_XOPEN2K8
+# define __POSIX2_THIS_VERSION 200809L
+/* The utilities on GNU systems also correspond to this version.  */
+#elif defined __USE_XOPEN2K
+/* The utilities on GNU systems also correspond to this version.  */
+# define __POSIX2_THIS_VERSION 200112L
+#elif defined __USE_POSIX199506
+/* The utilities on GNU systems also correspond to this version.  */
+# define __POSIX2_THIS_VERSION 199506L
+#else
+/* The utilities on GNU systems also correspond to this version.  */
+# define __POSIX2_THIS_VERSION 199209L
+#endif
+
 /* The utilities on GNU systems also correspond to this version.  */
-#define _POSIX2_VERSION        200809L
+#define _POSIX2_VERSION        __POSIX2_THIS_VERSION
 
 /* If defined, the implementation supports the
    C Language Bindings Option.  */
-#define        _POSIX2_C_BIND  200809L
+#define        _POSIX2_C_BIND  __POSIX2_THIS_VERSION
 
 /* If defined, the implementation supports the
    C Language Development Utilities Option.  */
-#define        _POSIX2_C_DEV   200809L
+#define        _POSIX2_C_DEV   __POSIX2_THIS_VERSION
 
 /* If defined, the implementation supports the
    Software Development Utilities Option.  */
-#define        _POSIX2_SW_DEV  200809L
+#define        _POSIX2_SW_DEV  __POSIX2_THIS_VERSION
 
 /* If defined, the implementation supports the
    creation of locales with the localedef utility.  */
-#define _POSIX2_LOCALEDEF       200809L
+#define _POSIX2_LOCALEDEF       __POSIX2_THIS_VERSION
 
 /* X/Open version number to which the library conforms.  It is selectable.  */
 #ifdef __USE_XOPEN2K8