summaryrefslogtreecommitdiff
path: root/src/vxworks
diff options
context:
space:
mode:
authorBaoshan Pang <baoshan.pang@windriver.com>2019-09-17 10:36:53 -0700
committerBaoshan Pang <baoshan.pang@windriver.com>2019-09-17 12:58:26 -0700
commitea0a512079782cea977cedd483cae79c51ed15cc (patch)
treebc896f94fb491f401d1927682b80a773815d89f3 /src/vxworks
parent134f12072204db2b0fb88d9bccec458e8f2273d5 (diff)
downloadrust-libc-ea0a512079782cea977cedd483cae79c51ed15cc.tar.gz
defining uintptr_t = usize and intptr_t/ptrdiff_t = isize, and using uintptr_t to define size_t, and intptr_t to define ssize_t.
Diffstat (limited to 'src/vxworks')
-rwxr-xr-xsrc/vxworks/mod.rs22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs
index 0cc107b14a..a25b1d598f 100755
--- a/src/vxworks/mod.rs
+++ b/src/vxworks/mod.rs
@@ -25,23 +25,11 @@ pub type c_ulonglong = u64;
pub type intmax_t = i64;
pub type uintmax_t = u64;
-cfg_if! {
- if #[cfg(target_pointer_width = "32")] {
- pub type size_t = c_uint;
- pub type ssize_t = c_int;
- pub type ptrdiff_t = c_int;
- pub type intptr_t = c_int;
- pub type uintptr_t = c_uint;
- } else if #[cfg(target_pointer_width = "64")] {
- pub type size_t = c_ulonglong;
- pub type ssize_t = c_longlong;
- pub type ptrdiff_t = c_longlong;
- pub type intptr_t = c_longlong;
- pub type uintptr_t = c_ulonglong;
- } else {
- // Unknown target_pointer_width
- }
-}
+pub type uintptr_t = usize;
+pub type intptr_t = isize;
+pub type ptrdiff_t = isize;
+pub type size_t = ::uintptr_t;
+pub type ssize_t = ::intptr_t;
pub type pid_t = i32;
pub type in_addr_t = u32;