提交 879cfe60 编写于 作者: K klutzy

std::rt::uv::uvll: Fix uv_req_type on Win32

Also enables request_sanity_check() test.

Closes #8817
上级 f3c88825
......@@ -237,6 +237,7 @@ pub enum uv_handle_type {
UV_HANDLE_TYPE_MAX
}
#[cfg(unix)]
#[deriving(Eq)]
pub enum uv_req_type {
UV_UNKNOWN_REQ,
......@@ -251,6 +252,31 @@ pub enum uv_req_type {
UV_REQ_TYPE_MAX
}
// uv_req_type may have additional fields defined by UV_REQ_TYPE_PRIVATE.
// See UV_REQ_TYPE_PRIVATE at libuv/include/uv-win.h
#[cfg(windows)]
#[deriving(Eq)]
pub enum uv_req_type {
UV_UNKNOWN_REQ,
UV_REQ,
UV_CONNECT,
UV_WRITE,
UV_SHUTDOWN,
UV_UDP_SEND,
UV_FS,
UV_WORK,
UV_GETADDRINFO,
UV_ACCEPT,
UV_FS_EVENT_REQ,
UV_POLL_REQ,
UV_PROCESS_EXIT,
UV_READ,
UV_UDP_RECV,
UV_WAKEUP,
UV_SIGNAL_REQ,
UV_REQ_TYPE_MAX
}
#[deriving(Eq)]
pub enum uv_membership {
UV_LEAVE_GROUP,
......@@ -298,10 +324,8 @@ fn handle_sanity_check() {
}
#[test]
#[ignore(cfg(windows))] // FIXME #8817
#[fixed_stack_segment]
#[inline(never)]
fn request_sanity_check() {
#[fixed_stack_segment]; #[inline(never)];
unsafe {
assert_eq!(UV_REQ_TYPE_MAX as uint, rust_uv_req_type_max());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册