summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordebris <marek.kotewicz@gmail.com>2018-08-15 10:49:08 +0200
committerdebris <marek.kotewicz@gmail.com>2018-08-15 10:49:08 +0200
commit504f286960dc9193a97fa78e53bdd9c4d6600cb5 (patch)
tree77e4e0afde61a5b32e3ecf2e2878da286b34804a
parent56dde29582adc9bf7cdc802a0e162c1f307662c6 (diff)
downloadrust-libc-504f286960dc9193a97fa78e53bdd9c4d6600cb5.tar.gz
Push function into lower modules
-rw-r--r--src/unix/bsd/apple/b32.rs6
-rw-r--r--src/unix/bsd/apple/b64.rs6
-rw-r--r--src/unix/bsd/apple/mod.rs8
3 files changed, 12 insertions, 8 deletions
diff --git a/src/unix/bsd/apple/b32.rs b/src/unix/bsd/apple/b32.rs
index 5dea472ccb..907ab02df4 100644
--- a/src/unix/bsd/apple/b32.rs
+++ b/src/unix/bsd/apple/b32.rs
@@ -58,3 +58,9 @@ pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 12;
pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;
+
+extern {
+ pub fn exchangedata(path1: *const ::c_char,
+ path2: *const ::c_char,
+ options: ::c_ulong) -> ::c_int;
+}
diff --git a/src/unix/bsd/apple/b64.rs b/src/unix/bsd/apple/b64.rs
index ca98f20952..8e8c87dd28 100644
--- a/src/unix/bsd/apple/b64.rs
+++ b/src/unix/bsd/apple/b64.rs
@@ -63,3 +63,9 @@ pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 16;
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;
+
+extern {
+ pub fn exchangedata(path1: *const ::c_char,
+ path2: *const ::c_char,
+ options: ::c_uint) -> ::c_int;
+}
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index 7324a344bb..cf48528b4a 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -2471,14 +2471,6 @@ extern {
pub fn renameatx_np(fromfd: ::c_int, from: *const ::c_char,
tofd: ::c_int, to: *const ::c_char,
flags: ::c_uint) -> ::c_int;
- #[cfg(target_arch = "x86")]
- pub fn exchangedata(path1: *const ::c_char,
- path2: *const ::c_char,
- options: ::c_ulong) -> ::c_int;
- #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
- pub fn exchangedata(path1: *const ::c_char,
- path2: *const ::c_char,
- options: ::c_uint) -> ::c_int;
pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char,
flags: ::c_int) -> ::c_int;