diff options
| author | klutzy <klutzytheklutzy@gmail.com> | 2013-09-16 03:13:42 +0900 |
|---|---|---|
| committer | klutzy <klutzytheklutzy@gmail.com> | 2013-09-16 03:33:29 +0900 |
| commit | 879cfe6049647cf8ecf31682b26e28b905f7d27e (patch) | |
| tree | c4d266c62c7a5de23d3ae69b7311bfd9340e8709 | |
| parent | f3c88825337c295850de546bd3d8745c8cad1224 (diff) | |
| download | rust-879cfe6049647cf8ecf31682b26e28b905f7d27e.tar.gz rust-879cfe6049647cf8ecf31682b26e28b905f7d27e.zip | |
std::rt::uv::uvll: Fix uv_req_type on Win32
Also enables request_sanity_check() test. Closes #8817
| -rw-r--r-- | src/libstd/rt/uv/uvll.rs | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/libstd/rt/uv/uvll.rs b/src/libstd/rt/uv/uvll.rs index 5bf04110abf..8f3cef4d238 100644 --- a/src/libstd/rt/uv/uvll.rs +++ b/src/libstd/rt/uv/uvll.rs @@ -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()); } |
