Auto merge of #551 - Mic92:readlinkat, r=alexcrichton

move *at family to unix

apparently supported on all platforms.
This commit is contained in:
bors 2017-03-23 20:37:54 +00:00
commit 443977132a
6 changed files with 39 additions and 139 deletions

View File

@ -1659,33 +1659,6 @@ extern {
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int, ...) -> ::c_int;
pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::c_int, flags: ::c_int) -> ::c_int;
pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, flags: ::c_int) -> ::c_int;
pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
owner: ::uid_t, group: ::gid_t,
flags: ::c_int) -> ::c_int;
#[cfg_attr(target_os = "macos", link_name = "fstatat$INODE64")]
pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut stat, flags: ::c_int) -> ::c_int;
pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char)
-> ::c_int;
pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
linkpath: *const ::c_char) -> ::c_int;
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int;
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),

View File

@ -1001,35 +1001,10 @@ extern {
pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int, ...) -> ::c_int;
pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::c_int, flags: ::c_int) -> ::c_int;
pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, flags: ::c_int) -> ::c_int;
pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
owner: ::uid_t, group: ::gid_t,
flags: ::c_int) -> ::c_int;
pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut stat, flags: ::c_int) -> ::c_int;
pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, dev: dev_t) -> ::c_int;
pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char)
-> ::c_int;
pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
linkpath: *const ::c_char) -> ::c_int;
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, dev: dev_t) -> ::c_int;
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
clock_id: *mut clockid_t) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,

View File

@ -597,39 +597,14 @@ extern {
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int, ...) -> ::c_int;
pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::c_int, flags: ::c_int) -> ::c_int;
pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, flags: ::c_int) -> ::c_int;
pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
owner: ::uid_t, group: ::gid_t,
flags: ::c_int) -> ::c_int;
pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut stat, flags: ::c_int) -> ::c_int;
pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, dev: dev_t) -> ::c_int;
pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char)
-> ::c_int;
pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
linkpath: *const ::c_char) -> ::c_int;
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn sem_timedwait(sem: *mut sem_t,
abstime: *const ::timespec) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: clockid_t) -> ::c_int;
pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, dev: dev_t) -> ::c_int;
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn sem_timedwait(sem: *mut sem_t,
abstime: *const ::timespec) -> ::c_int;
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
clock_id: clockid_t) -> ::c_int;
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
abstime: *const ::timespec) -> ::c_int;

View File

@ -363,6 +363,33 @@ extern {
link_name = "rewinddir$INODE64$UNIX2003")]
pub fn rewinddir(dirp: *mut ::DIR);
pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int, ...) -> ::c_int;
pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::c_int, flags: ::c_int) -> ::c_int;
pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, flags: ::c_int) -> ::c_int;
pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
owner: ::uid_t, group: ::gid_t,
flags: ::c_int) -> ::c_int;
#[cfg_attr(target_os = "macos", link_name = "fstatat$INODE64")]
pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut stat, flags: ::c_int) -> ::c_int;
pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char)
-> ::c_int;
pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
linkpath: *const ::c_char) -> ::c_int;
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
pub fn alarm(seconds: ::c_uint) -> ::c_uint;
pub fn chdir(dir: *const c_char) -> ::c_int;

View File

@ -928,33 +928,8 @@ extern {
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
pub fn sysinfo (info: *mut ::sysinfo) -> ::c_int;
pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int, ...) -> ::c_int;
pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::c_int, flags: ::c_int) -> ::c_int;
pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, flags: ::c_int) -> ::c_int;
pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
owner: ::uid_t, group: ::gid_t,
flags: ::c_int) -> ::c_int;
pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut stat, flags: ::c_int) -> ::c_int;
pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, dev: dev_t) -> ::c_int;
pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char)
-> ::c_int;
pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
linkpath: *const ::c_char) -> ::c_int;
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn ppoll(fds: *mut ::pollfd,
nfds: nfds_t,
timeout: *const ::timespec,

View File

@ -1052,33 +1052,8 @@ extern {
pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int, ...) -> ::c_int;
pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::c_int, flags: ::c_int) -> ::c_int;
pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, flags: ::c_int) -> ::c_int;
pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
owner: ::uid_t, group: ::gid_t,
flags: ::c_int) -> ::c_int;
pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut stat, flags: ::c_int) -> ::c_int;
pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t, dev: dev_t) -> ::c_int;
pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
newdirfd: ::c_int, newpath: *const ::c_char)
-> ::c_int;
pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
linkpath: *const ::c_char) -> ::c_int;
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
flags: ::c_int) -> ::c_int;
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
mode: ::mode_t) -> ::c_int;
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;