Skip to content

Commit ea0a512

Browse files
committed
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.
1 parent 134f120 commit ea0a512

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

src/vxworks/mod.rs

+5-17
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,11 @@ pub type c_ulonglong = u64;
2525
pub type intmax_t = i64;
2626
pub type uintmax_t = u64;
2727

28-
cfg_if! {
29-
if #[cfg(target_pointer_width = "32")] {
30-
pub type size_t = c_uint;
31-
pub type ssize_t = c_int;
32-
pub type ptrdiff_t = c_int;
33-
pub type intptr_t = c_int;
34-
pub type uintptr_t = c_uint;
35-
} else if #[cfg(target_pointer_width = "64")] {
36-
pub type size_t = c_ulonglong;
37-
pub type ssize_t = c_longlong;
38-
pub type ptrdiff_t = c_longlong;
39-
pub type intptr_t = c_longlong;
40-
pub type uintptr_t = c_ulonglong;
41-
} else {
42-
// Unknown target_pointer_width
43-
}
44-
}
28+
pub type uintptr_t = usize;
29+
pub type intptr_t = isize;
30+
pub type ptrdiff_t = isize;
31+
pub type size_t = ::uintptr_t;
32+
pub type ssize_t = ::intptr_t;
4533

4634
pub type pid_t = i32;
4735
pub type in_addr_t = u32;

0 commit comments

Comments
 (0)