diff options
Diffstat (limited to 'include/unistd.h')
| -rw-r--r-- | include/unistd.h | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/include/unistd.h b/include/unistd.h index df6c676..318fcc5 100644 --- a/include/unistd.h +++ b/include/unistd.h | |||
| @@ -21,8 +21,7 @@ extern "C" { | |||
| 21 | #undef ttyname_r | 21 | #undef ttyname_r |
| 22 | #undef write | 22 | #undef write |
| 23 | 23 | ||
| 24 | extern size_t __confstr_orig(int, char *, size_t) | 24 | __typeof__(confstr) __confstr_orig __asm__(__USER_LABEL_PREFIX__ "confstr"); |
| 25 | __asm__(__USER_LABEL_PREFIX__ "confstr"); | ||
| 26 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 25 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 27 | size_t confstr(int name, char *buf, size_t len) | 26 | size_t confstr(int name, char *buf, size_t len) |
| 28 | { | 27 | { |
| @@ -33,8 +32,7 @@ size_t confstr(int name, char *buf, size_t len) | |||
| 33 | return __confstr_orig(name, buf, len); | 32 | return __confstr_orig(name, buf, len); |
| 34 | } | 33 | } |
| 35 | 34 | ||
| 36 | extern char *__getcwd_orig(char *, size_t) | 35 | __typeof__(getcwd) __getcwd_orig __asm__(__USER_LABEL_PREFIX__ "getcwd"); |
| 37 | __asm__(__USER_LABEL_PREFIX__ "getcwd"); | ||
| 38 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 36 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 39 | char *getcwd(char *buf, size_t len) | 37 | char *getcwd(char *buf, size_t len) |
| 40 | { | 38 | { |
| @@ -47,8 +45,7 @@ char *getcwd(char *buf, size_t len) | |||
| 47 | 45 | ||
| 48 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 46 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 49 | #undef getdomainname | 47 | #undef getdomainname |
| 50 | extern int __getdomainname_orig(char *, size_t) | 48 | __typeof__(getdomainname) __getdomainname_orig __asm__(__USER_LABEL_PREFIX__ "getdomainname"); |
| 51 | __asm__(__USER_LABEL_PREFIX__ "getdomainname"); | ||
| 52 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 49 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 53 | int getdomainname(char *name, size_t len) | 50 | int getdomainname(char *name, size_t len) |
| 54 | { | 51 | { |
| @@ -60,8 +57,7 @@ int getdomainname(char *name, size_t len) | |||
| 60 | } | 57 | } |
| 61 | #endif | 58 | #endif |
| 62 | 59 | ||
| 63 | extern int __getgroups_orig(int, gid_t *) | 60 | __typeof__(getgroups) __getgroups_orig __asm__(__USER_LABEL_PREFIX__ "getgroups"); |
| 64 | __asm__(__USER_LABEL_PREFIX__ "getgroups"); | ||
| 65 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 61 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 66 | int getgroups(int len, gid_t *set) | 62 | int getgroups(int len, gid_t *set) |
| 67 | { | 63 | { |
| @@ -72,8 +68,7 @@ int getgroups(int len, gid_t *set) | |||
| 72 | return __getgroups_orig(len, set); | 68 | return __getgroups_orig(len, set); |
| 73 | } | 69 | } |
| 74 | 70 | ||
| 75 | extern int __gethostname_orig(char *, size_t) | 71 | __typeof__(gethostname) __gethostname_orig __asm__(__USER_LABEL_PREFIX__ "gethostname"); |
| 76 | __asm__(__USER_LABEL_PREFIX__ "gethostname"); | ||
| 77 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 72 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 78 | int gethostname(char *name, size_t len) | 73 | int gethostname(char *name, size_t len) |
| 79 | { | 74 | { |
| @@ -84,8 +79,7 @@ int gethostname(char *name, size_t len) | |||
| 84 | return __gethostname_orig(name, len); | 79 | return __gethostname_orig(name, len); |
| 85 | } | 80 | } |
| 86 | 81 | ||
| 87 | extern int __getlogin_r_orig(char *, size_t) | 82 | __typeof__(getlogin_r) __getlogin_r_orig __asm__(__USER_LABEL_PREFIX__ "getlogin_r"); |
| 88 | __asm__(__USER_LABEL_PREFIX__ "getlogin_r"); | ||
| 89 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 83 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 90 | int getlogin_r(char *name, size_t len) | 84 | int getlogin_r(char *name, size_t len) |
| 91 | { | 85 | { |
| @@ -96,8 +90,7 @@ int getlogin_r(char *name, size_t len) | |||
| 96 | return __getlogin_r_orig(name, len); | 90 | return __getlogin_r_orig(name, len); |
| 97 | } | 91 | } |
| 98 | 92 | ||
| 99 | extern ssize_t __pread_orig(int, void *, size_t, off_t) | 93 | __typeof__(pread) __pread_orig __asm__(__USER_LABEL_PREFIX__ "pread"); |
| 100 | __asm__(__USER_LABEL_PREFIX__ "pread"); | ||
| 101 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 94 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 102 | ssize_t pread(int fd, void *buf, size_t n, off_t offset) | 95 | ssize_t pread(int fd, void *buf, size_t n, off_t offset) |
| 103 | { | 96 | { |
| @@ -108,8 +101,7 @@ ssize_t pread(int fd, void *buf, size_t n, off_t offset) | |||
| 108 | return __pread_orig(fd, buf, n, offset); | 101 | return __pread_orig(fd, buf, n, offset); |
| 109 | } | 102 | } |
| 110 | 103 | ||
| 111 | extern ssize_t __read_orig(int, void *, size_t) | 104 | __typeof__(read) __read_orig __asm__(__USER_LABEL_PREFIX__ "read"); |
| 112 | __asm__(__USER_LABEL_PREFIX__ "read"); | ||
| 113 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 105 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 114 | ssize_t read(int fd, void *buf, size_t n) | 106 | ssize_t read(int fd, void *buf, size_t n) |
| 115 | { | 107 | { |
| @@ -120,8 +112,7 @@ ssize_t read(int fd, void *buf, size_t n) | |||
| 120 | return __read_orig(fd, buf, n); | 112 | return __read_orig(fd, buf, n); |
| 121 | } | 113 | } |
| 122 | 114 | ||
| 123 | extern ssize_t __readlink_orig(const char *, char *, size_t) | 115 | __typeof__(readlink) __readlink_orig __asm__(__USER_LABEL_PREFIX__ "readlink"); |
| 124 | __asm__(__USER_LABEL_PREFIX__ "readlink"); | ||
| 125 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 116 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 126 | ssize_t readlink(const char *path, char *buf, size_t n) | 117 | ssize_t readlink(const char *path, char *buf, size_t n) |
| 127 | { | 118 | { |
| @@ -132,8 +123,7 @@ ssize_t readlink(const char *path, char *buf, size_t n) | |||
| 132 | return __readlink_orig(path, buf, n); | 123 | return __readlink_orig(path, buf, n); |
| 133 | } | 124 | } |
| 134 | 125 | ||
| 135 | extern ssize_t __readlinkat_orig(int, const char *, char *, size_t) | 126 | __typeof__(readlinkat) __readlinkat_orig __asm__(__USER_LABEL_PREFIX__ "readlinkat"); |
| 136 | __asm__(__USER_LABEL_PREFIX__ "readlinkat"); | ||
| 137 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 127 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 138 | ssize_t readlinkat(int fd, const char *path, char *buf, size_t n) | 128 | ssize_t readlinkat(int fd, const char *path, char *buf, size_t n) |
| 139 | { | 129 | { |
| @@ -144,8 +134,7 @@ ssize_t readlinkat(int fd, const char *path, char *buf, size_t n) | |||
| 144 | return __readlinkat_orig(fd, path, buf, n); | 134 | return __readlinkat_orig(fd, path, buf, n); |
| 145 | } | 135 | } |
| 146 | 136 | ||
| 147 | extern int __ttyname_r_orig(int, char *, size_t) | 137 | __typeof__(ttyname_r) __ttyname_r_orig __asm__(__USER_LABEL_PREFIX__ "ttyname_r"); |
| 148 | __asm__(__USER_LABEL_PREFIX__ "ttyname_r"); | ||
| 149 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 138 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 150 | int ttyname_r(int fd, char *name, size_t n) | 139 | int ttyname_r(int fd, char *name, size_t n) |
| 151 | { | 140 | { |
| @@ -156,8 +145,7 @@ int ttyname_r(int fd, char *name, size_t n) | |||
| 156 | return __ttyname_r_orig(fd, name, n); | 145 | return __ttyname_r_orig(fd, name, n); |
| 157 | } | 146 | } |
| 158 | 147 | ||
| 159 | extern ssize_t __write_orig(int, const void *, size_t) | 148 | __typeof__(write) __write_orig __asm__(__USER_LABEL_PREFIX__ "write"); |
| 160 | __asm__(__USER_LABEL_PREFIX__ "write"); | ||
| 161 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 149 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 162 | ssize_t write(int fd, const void *buf, size_t n) | 150 | ssize_t write(int fd, const void *buf, size_t n) |
| 163 | { | 151 | { |
