diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-08-23 14:55:51 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-08-23 14:55:51 -0700 |
commit | bdc7f5d76b4f284475595dddc79f0e0f9720ec20 (patch) | |
tree | e785157977597e50973af9d82b976296bd4be6bd /posix/unistd.h | |
parent | 2d094b739598d2e1718d3cc4c5af7e95787bd463 (diff) | |
download | glibc-bdc7f5d76b4f284475595dddc79f0e0f9720ec20.tar glibc-bdc7f5d76b4f284475595dddc79f0e0f9720ec20.tar.gz glibc-bdc7f5d76b4f284475595dddc79f0e0f9720ec20.tar.bz2 glibc-bdc7f5d76b4f284475595dddc79f0e0f9720ec20.zip |
Also correct _POSIX2_* constants in case older standards are selected.
Diffstat (limited to 'posix/unistd.h')
-rw-r--r-- | posix/unistd.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/posix/unistd.h b/posix/unistd.h index 2de9a68b39..d9ecb5e788 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -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 |