]> git.lizzy.rs Git - rust.git/commitdiff
zircon: the type of zx_handle_t is now unsigned
authorJames Tucker <jftucker@gmail.com>
Wed, 4 Oct 2017 21:08:53 +0000 (14:08 -0700)
committerJames Tucker <jftucker@gmail.com>
Wed, 4 Oct 2017 22:12:44 +0000 (15:12 -0700)
This is a kernel ABI change that landed today. I noticed some other ABI
issues and have left a note to cleanup once they are better defined.

src/libstd/sys/unix/process/zircon.rs

index b5ec11b40fd3d0c7033e5e04f1864b3ce651f618..8d0ad30f9c8ba18411def4b7031cd8adf6b15c84 100644 (file)
 
 use libc::{c_int, c_void};
 
-pub type zx_handle_t = i32;
+pub type zx_handle_t = u32;
 pub type zx_vaddr_t = usize;
 pub type zx_rights_t = u32;
 pub type zx_status_t = i32;
 
+// TODO(raggi): zx_size_t was removed from Zircon. various syscall API docs use size_t here, but
+// don't define that well at the ABI level yet, as the C spec definition of size_t isn't what is
+// meant. In the future Zirocn will define size_t more strictly for it's ABI. At that time,
+// zx_size_t should be removed here, and replaced with an appropriately sized type with a
+// sufficiently strict definition.
 pub type zx_size_t = usize;
 
 pub const ZX_HANDLE_INVALID: zx_handle_t = 0;