Verified Commit e3b2bdcc authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

unistd: namespace pollution fixes

These interfaces are all scheduled for addition in Issue 8.

They cannot be available if _XOPEN_SOURCE is <= 700, or
_POSIX_C_SOURCE is <= 200809L.
parent 67bc56fe
......@@ -33,16 +33,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);
......@@ -202,8 +209,6 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
#define off64_t off_t
#endif
#define POSIX_CLOSE_RESTART 0
#define _XOPEN_VERSION 700
#define _XOPEN_UNIX 1
#define _XOPEN_ENH_I18N 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment