diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fcntl.in.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index 99f75e60fd4..e23b4b2bcdd 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h | |||
| @@ -186,6 +186,22 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " | |||
| 186 | 186 | ||
| 187 | /* Fix up the O_* macros. */ | 187 | /* Fix up the O_* macros. */ |
| 188 | 188 | ||
| 189 | /* AIX 7.1 with XL C 12.1 defines O_CLOEXEC, O_NOFOLLOW, and O_TTY_INIT | ||
| 190 | to values outside 'int' range, so omit these misdefinitions. | ||
| 191 | But avoid namespace pollution on non-AIX systems. */ | ||
| 192 | #ifdef _AIX | ||
| 193 | # include <limits.h> | ||
| 194 | # if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX) | ||
| 195 | # undef O_CLOEXEC | ||
| 196 | # endif | ||
| 197 | # if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX) | ||
| 198 | # undef O_NOFOLLOW | ||
| 199 | # endif | ||
| 200 | # if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX) | ||
| 201 | # undef O_TTY_INIT | ||
| 202 | # endif | ||
| 203 | #endif | ||
| 204 | |||
| 189 | #if !defined O_DIRECT && defined O_DIRECTIO | 205 | #if !defined O_DIRECT && defined O_DIRECTIO |
| 190 | /* Tru64 spells it 'O_DIRECTIO'. */ | 206 | /* Tru64 spells it 'O_DIRECTIO'. */ |
| 191 | # define O_DIRECT O_DIRECTIO | 207 | # define O_DIRECT O_DIRECTIO |