From 684c4574c09a6f2cc5a208e4505e9306602b4abc Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 29 May 2017 14:07:12 -0700 Subject: Update libc crate to 0.2.23 The 'libc' create got a couple of updates. This change imports the new code and bumps the version to use. Import subrepo libc/:libc at 7db3fd570dfb41a38fb17116e93679307178103a --- libc/src/unix/bsd/apple/b64.rs | 2 ++ libc/src/unix/bsd/apple/mod.rs | 57 ++++++++++++++++++++++++------------------ 2 files changed, 34 insertions(+), 25 deletions(-) (limited to 'libc/src/unix/bsd/apple') diff --git a/libc/src/unix/bsd/apple/b64.rs b/libc/src/unix/bsd/apple/b64.rs index 327a4b6..3f83230 100644 --- a/libc/src/unix/bsd/apple/b64.rs +++ b/libc/src/unix/bsd/apple/b64.rs @@ -17,3 +17,5 @@ pub const __PTHREAD_RWLOCK_SIZE__: usize = 192; pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458; + +pub const FIONREAD: ::c_ulong = 0x4004667f; diff --git a/libc/src/unix/bsd/apple/mod.rs b/libc/src/unix/bsd/apple/mod.rs index 132b69d..6f0c55b 100644 --- a/libc/src/unix/bsd/apple/mod.rs +++ b/libc/src/unix/bsd/apple/mod.rs @@ -665,6 +665,12 @@ pub const F_ALLOCATEALL: ::c_uint = 0x04; pub const F_PEOFPOSMODE: ::c_int = 3; pub const F_VOLPOSMODE: ::c_int = 4; +pub const AT_FDCWD: ::c_int = -2; +pub const AT_EACCESS: ::c_int = 0x0010; +pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020; +pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040; +pub const AT_REMOVEDIR: ::c_int = 0x0080; + pub const O_ACCMODE: ::c_int = 3; pub const TIOCMODG: ::c_ulong = 0x40047403; @@ -1510,6 +1516,13 @@ pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; pub const P_PGID: idtype_t = 2; +pub const XATTR_NOFOLLOW: ::c_int = 0x0001; +pub const XATTR_CREATE: ::c_int = 0x0002; +pub const XATTR_REPLACE: ::c_int = 0x0004; +pub const XATTR_NOSECURITY: ::c_int = 0x0008; +pub const XATTR_NODEFAULT: ::c_int = 0x0010; +pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020; + f! { pub fn WSTOPSIG(status: ::c_int) -> ::c_int { status >> 8 @@ -1659,32 +1672,26 @@ 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, + pub fn getxattr(path: *const ::c_char, name: *const ::c_char, + value: *mut ::c_void, size: ::size_t, position: u32, + flags: ::c_int) -> ::ssize_t; + pub fn fgetxattr(filedes: ::c_int, name: *const ::c_char, + value: *mut ::c_void, size: ::size_t, position: u32, + flags: ::c_int) -> ::ssize_t; + pub fn setxattr(path: *const ::c_char, name: *const ::c_char, + value: *const ::c_void, size: ::size_t, position: u32, 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 fsetxattr(filedes: ::c_int, name: *const ::c_char, + value: *const ::c_void, size: ::size_t, position: u32, + flags: ::c_int) -> ::c_int; + pub fn listxattr(path: *const ::c_char, list: *mut ::c_char, + size: ::size_t, flags: ::c_int) -> ::ssize_t; + pub fn flistxattr(filedes: ::c_int, list: *mut ::c_char, + size: ::size_t, flags: ::c_int) -> ::ssize_t; + pub fn removexattr(path: *const ::c_char, name: *const ::c_char, + flags: ::c_int) -> ::c_int; + pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char, + flags: ::c_int) -> ::c_int; pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int; -- cgit v1.2.3