diff options
-rw-r--r-- | include/unistd.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/unistd.h b/include/unistd.h index 0ee0e922..e6bf2ca7 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -37,16 +37,23 @@ extern "C" { #include <bits/alltypes.h> int pipe(int [2]); -int pipe2(int [2], int); int close(int); -int posix_close(int, int); int dup(int); int dup2(int, int); -int dup3(int, int, int); off_t lseek(int, off_t, int); int fsync(int); int fdatasync(int); +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \ + || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 > 700) \ + || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE+0 > 200809L) +int pipe2(int [2], int); +int dup3(int, int, int); +int posix_close(int, int); + +#define POSIX_CLOSE_RESTART 0 +#endif + ssize_t read(int, void *, size_t); ssize_t write(int, const void *, size_t); ssize_t pread(int, void *, size_t, off_t); @@ -208,8 +215,6 @@ pid_t gettid(void); #define off64_t off_t #endif -#define POSIX_CLOSE_RESTART 0 - #define _XOPEN_VERSION 700 #define _XOPEN_UNIX 1 #define _XOPEN_ENH_I18N 1 |