summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordebris <marek.kotewicz@gmail.com>2018-06-04 15:51:32 +0200
committerdebris <marek.kotewicz@gmail.com>2018-06-04 15:51:32 +0200
commit7315cfda3569251f16db8c309b91419e66f81c9b (patch)
treea5188e64bacb8f6095774ba0af1b9a4f2d6adb51
parent8a85d662b90c14d458bc4ae9521a05564e20d7ae (diff)
downloadrust-libc-7315cfda3569251f16db8c309b91419e66f81c9b.tar.gz
added renameat2, renamex_np, renameatx_np
-rw-r--r--src/unix/bsd/apple/mod.rs8
-rw-r--r--src/unix/notbsd/linux/mod.rs3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index d97eb3f4f6..147ee80c24 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -1859,6 +1859,9 @@ pub const NI_MAXHOST: ::socklen_t = 1025;
pub const Q_GETQUOTA: ::c_int = 0x300;
pub const Q_SETQUOTA: ::c_int = 0x400;
+pub const RENAME_SWAP: ::c_uint = 0x00000002;
+pub const RENAME_EXCL: ::c_uint = 0x00000004;
+
pub const RTLD_LOCAL: ::c_int = 0x4;
pub const RTLD_FIRST: ::c_int = 0x100;
pub const RTLD_NODELETE: ::c_int = 0x80;
@@ -2451,6 +2454,11 @@ extern {
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 renamex_np(from: *const ::c_char, to: *const ::c_char,
+ flags: ::c_uint) -> ::c_int;
+ pub fn renameatx_np(fromfd: ::c_int, from: *const ::c_char,
+ tofd: ::c_int, to: *const ::c_char,
+ flags: ::c_uint) -> ::c_int;
pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char,
flags: ::c_int) -> ::c_int;
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 60e0d8e2a8..5c7f96139b 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1616,6 +1616,9 @@ extern {
len: ::off_t) -> ::c_int;
pub fn readahead(fd: ::c_int, offset: ::off64_t,
count: ::size_t) -> ::ssize_t;
+ pub fn renameat2(olddirfd: ::c_int, oldpath: *const ::c_char,
+ newdirfd: ::c_int, newpath: *const ::c_char,
+ flags: ::c_int) -> ::c_int;
pub fn getxattr(path: *const c_char, name: *const c_char,
value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
pub fn lgetxattr(path: *const c_char, name: *const c_char,