diff options
author | Pavel Krajcevski <pavel@cs.unc.edu> | 2016-01-20 00:49:02 -0500 |
---|---|---|
committer | Pavel Krajcevski <pavel@cs.unc.edu> | 2016-01-20 16:05:51 -0500 |
commit | 2cf9e828909e3c183357a37c622492b459c67f3a (patch) | |
tree | 4902ae90c0adc9ecf58dd3e52be16b6da91013a6 | |
parent | aea17ed1a6e87c310e333a92a51cb93a9812cb68 (diff) | |
download | rust-libc-2cf9e828909e3c183357a37c622492b459c67f3a.tar.gz |
Preliminary PowerPC Support
-rw-r--r-- | src/unix/notbsd/linux/other/b32/mod.rs | 3 | ||||
-rw-r--r-- | src/unix/notbsd/linux/other/b32/powerpc.rs | 20 | ||||
-rw-r--r-- | src/unix/notbsd/linux/other/mod.rs | 4 |
3 files changed, 26 insertions, 1 deletions
diff --git a/src/unix/notbsd/linux/other/b32/mod.rs b/src/unix/notbsd/linux/other/b32/mod.rs index 0833d21fd2..12d4669812 100644 --- a/src/unix/notbsd/linux/other/b32/mod.rs +++ b/src/unix/notbsd/linux/other/b32/mod.rs @@ -86,6 +86,9 @@ cfg_if! { } else if #[cfg(target_arch = "arm")] { mod arm; pub use self::arm::*; + } else if #[cfg(target_arch = "powerpc")] { + mod powerpc; + pub use self::powerpc::*; } else { // ... } diff --git a/src/unix/notbsd/linux/other/b32/powerpc.rs b/src/unix/notbsd/linux/other/b32/powerpc.rs new file mode 100644 index 0000000000..4ebfeda40c --- /dev/null +++ b/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -0,0 +1,20 @@ +pub type c_char = u8; +pub type wchar_t = i32; + +pub const O_DIRECT: ::c_int = 0x20000; +pub const O_DIRECTORY: ::c_int = 0x4000; +pub const O_NOFOLLOW: ::c_int = 0x8000; + +pub const MAP_LOCKED: ::c_int = 0x00080; +pub const MAP_NORESERVE: ::c_int = 0x00040; + +pub const EDEADLOCK: ::c_int = 58; + +pub const SO_PEERCRED: ::c_int = 21; +pub const SO_RCVLOWAT: ::c_int = 16; +pub const SO_SNDLOWAT: ::c_int = 17; +pub const SO_RCVTIMEO: ::c_int = 18; +pub const SO_SNDTIMEO: ::c_int = 19; + +pub const FIOCLEX: ::c_ulong = 0x20006601; +pub const FIONBIO: ::c_ulong = 0x8004667e; diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index d0d59dae8d..1c842b24f9 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -429,7 +429,9 @@ extern { } cfg_if! { - if #[cfg(any(target_arch = "x86", target_arch = "arm"))] { + if #[cfg(any(target_arch = "x86", + target_arch = "arm", + target_arch = "powerpc"))] { mod b32; pub use self::b32::*; } else if #[cfg(any(target_arch = "x86_64", |