Win32 warning police.
This commit is contained in:
parent
6a7de641da
commit
6784b18303
@ -3,10 +3,6 @@ This is intended to be a low-level binding to libuv that very closely mimics
|
||||
the C libuv API. Does very little right now pending scheduler improvements.
|
||||
*/
|
||||
|
||||
#[cfg(target_os = "linux")];
|
||||
#[cfg(target_os = "macos")];
|
||||
#[cfg(target_os = "freebsd")];
|
||||
|
||||
export sanity_check;
|
||||
export loop_t, idle_t;
|
||||
export loop_new, loop_delete, default_loop, run, unref;
|
||||
@ -38,9 +34,6 @@ type handle_type = ctypes::enum;
|
||||
type close_cb = opaque_cb;
|
||||
type idle_cb = opaque_cb;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
type handle_private_fields = {
|
||||
a00: ctypes::c_int,
|
||||
a01: ctypes::c_int,
|
||||
@ -121,9 +114,6 @@ fn sanity_check() {
|
||||
sys::size_of::<idle_t>());
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
fn handle_fields_new() -> handle_fields {
|
||||
{
|
||||
loop: ptr::null(),
|
||||
@ -154,6 +144,13 @@ fn idle_new() -> idle_t {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
// FIXME: We're out of date on libuv and not testing
|
||||
// it on windows presently. This needs to change.
|
||||
mod os {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
@ -196,4 +193,4 @@ mod tests {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,5 @@
|
||||
// Some temporary libuv hacks for servo
|
||||
|
||||
#[cfg(target_os = "linux")];
|
||||
#[cfg(target_os = "macos")];
|
||||
#[cfg(target_os = "freebsd")];
|
||||
|
||||
|
||||
#[nolink]
|
||||
native mod rustrt {
|
||||
fn rust_uvtmp_create_thread() -> thread;
|
||||
@ -100,6 +95,13 @@ fn get_req_id(cd: connect_data) -> u32 {
|
||||
ret rustrt::rust_uvtmp_get_req_id(cd);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
// FIXME: We're out of date on libuv and not testing
|
||||
// it on windows presently. This needs to change.
|
||||
mod os {
|
||||
|
||||
#[test]
|
||||
fn test_start_stop() {
|
||||
let thread = create_thread();
|
||||
@ -150,7 +152,8 @@ fn test_http() {
|
||||
read(_, buf, len) {
|
||||
unsafe {
|
||||
log(error, len);
|
||||
let buf = vec::unsafe::from_buf(buf, len as uint);
|
||||
let buf = vec::unsafe::from_buf(buf,
|
||||
len as uint);
|
||||
let str = str::from_bytes(buf);
|
||||
#error("read something");
|
||||
io::println(str);
|
||||
@ -170,3 +173,4 @@ fn test_http() {
|
||||
join_thread(thread);
|
||||
delete_thread(thread);
|
||||
}
|
||||
}
|
@ -44,7 +44,7 @@ mod libc_constants {
|
||||
}
|
||||
|
||||
type DWORD = u32;
|
||||
type HMODULE = uint;
|
||||
type HMODULE = c_uint;
|
||||
type LPTSTR = str::sbuf;
|
||||
type LPCTSTR = str::sbuf;
|
||||
|
||||
@ -52,9 +52,9 @@ type LPSECURITY_ATTRIBUTES = *ctypes::void;
|
||||
|
||||
#[abi = "stdcall"]
|
||||
native mod kernel32 {
|
||||
fn GetEnvironmentVariableA(n: str::sbuf, v: str::sbuf, nsize: uint) ->
|
||||
uint;
|
||||
fn SetEnvironmentVariableA(n: str::sbuf, v: str::sbuf) -> int;
|
||||
fn GetEnvironmentVariableA(n: str::sbuf, v: str::sbuf, nsize: c_uint) ->
|
||||
c_uint;
|
||||
fn SetEnvironmentVariableA(n: str::sbuf, v: str::sbuf) -> c_int;
|
||||
fn GetModuleFileNameA(hModule: HMODULE,
|
||||
lpFilename: LPTSTR,
|
||||
nSize: DWORD) -> DWORD;
|
||||
@ -99,7 +99,7 @@ fn fclose(file: FILE) {
|
||||
libc::fclose(file)
|
||||
}
|
||||
|
||||
fn fsync_fd(fd: fd_t, level: io::fsync::level) -> c_int {
|
||||
fn fsync_fd(_fd: fd_t, _level: io::fsync::level) -> c_int {
|
||||
// FIXME (1253)
|
||||
fail;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user