Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
0ec4d34b
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0ec4d34b
编写于
9月 16, 2013
作者:
B
bors
浏览文件
操作
浏览文件
下载
差异文件
auto merge of #9211 : klutzy/rust/win32-fix, r=alexcrichton
上级
250c3d47
6d9c399e
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
47 addition
and
35 deletion
+47
-35
src/libextra/fileinput.rs
src/libextra/fileinput.rs
+0
-9
src/libstd/os.rs
src/libstd/os.rs
+9
-10
src/libstd/rt/io/file.rs
src/libstd/rt/io/file.rs
+3
-5
src/libstd/rt/io/net/tcp.rs
src/libstd/rt/io/net/tcp.rs
+7
-2
src/libstd/rt/io/support.rs
src/libstd/rt/io/support.rs
+1
-2
src/libstd/rt/uv/file.rs
src/libstd/rt/uv/file.rs
+0
-2
src/libstd/rt/uv/uvio.rs
src/libstd/rt/uv/uvio.rs
+0
-2
src/libstd/rt/uv/uvll.rs
src/libstd/rt/uv/uvll.rs
+27
-3
未找到文件。
src/libextra/fileinput.rs
浏览文件 @
0ec4d34b
...
...
@@ -433,7 +433,6 @@ fn make_file(path : &Path, contents: &[~str]) {
}
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_make_path_option_vec
()
{
let
strs
=
[
~
"some/path"
,
~
"some/other/path"
];
...
...
@@ -448,7 +447,6 @@ fn test_make_path_option_vec() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_fileinput_read_byte
()
{
let
filenames
=
make_path_option_vec
(
vec
::
from_fn
(
3
,
...
...
@@ -479,7 +477,6 @@ fn test_fileinput_read_byte() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_fileinput_read
()
{
let
filenames
=
make_path_option_vec
(
vec
::
from_fn
(
3
,
...
...
@@ -500,7 +497,6 @@ fn test_fileinput_read() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_input_vec
()
{
let
mut
all_lines
=
~
[];
let
filenames
=
make_path_option_vec
(
vec
::
from_fn
(
...
...
@@ -524,7 +520,6 @@ fn test_input_vec() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_input_vec_state
()
{
let
filenames
=
make_path_option_vec
(
vec
::
from_fn
(
3
,
...
...
@@ -547,7 +542,6 @@ fn test_input_vec_state() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_empty_files
()
{
let
filenames
=
make_path_option_vec
(
vec
::
from_fn
(
3
,
...
...
@@ -572,7 +566,6 @@ fn test_empty_files() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_no_trailing_newline
()
{
let
f1
=
Some
(
Path
(
"tmp/lib-fileinput-test-no-trailing-newline-1.tmp"
));
...
...
@@ -598,7 +591,6 @@ fn test_no_trailing_newline() {
#[test]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_next_file
()
{
let
filenames
=
make_path_option_vec
(
vec
::
from_fn
(
3
,
...
...
@@ -630,7 +622,6 @@ fn test_next_file() {
#[test]
#[should_fail]
#[ignore(cfg(windows))]
// FIXME(#8810): rt::io::file and windows don't agree
fn
test_input_vec_missing_file
()
{
do
input_vec
(
make_path_option_vec
([
~
"this/file/doesnt/exist"
],
true
))
|
line
|
{
println
(
line
);
...
...
src/libstd/os.rs
浏览文件 @
0ec4d34b
...
...
@@ -1135,18 +1135,19 @@ fn strerror() -> ~str {
#[fixed_stack_segment]
;
#[inline(never)]
;
use
libc
::
types
::
os
::
arch
::
extra
::
DWORD
;
use
libc
::
types
::
os
::
arch
::
extra
::
LPSTR
;
use
libc
::
types
::
os
::
arch
::
extra
::
LP
W
STR
;
use
libc
::
types
::
os
::
arch
::
extra
::
LPVOID
;
use
libc
::
types
::
os
::
arch
::
extra
::
WCHAR
;
#[cfg(target_arch
=
"x86"
)]
#[link_name
=
"kernel32"
]
#[abi
=
"stdcall"
]
extern
"stdcall"
{
fn
FormatMessage
A
(
flags
:
DWORD
,
fn
FormatMessage
W
(
flags
:
DWORD
,
lpSrc
:
LPVOID
,
msgId
:
DWORD
,
langId
:
DWORD
,
buf
:
LPSTR
,
buf
:
LP
W
STR
,
nsize
:
DWORD
,
args
:
*
c_void
)
->
DWORD
;
...
...
@@ -1155,11 +1156,11 @@ fn FormatMessageA(flags: DWORD,
#[cfg(target_arch
=
"x86_64"
)]
#[link_name
=
"kernel32"
]
extern
{
fn
FormatMessage
A
(
flags
:
DWORD
,
fn
FormatMessage
W
(
flags
:
DWORD
,
lpSrc
:
LPVOID
,
msgId
:
DWORD
,
langId
:
DWORD
,
buf
:
LPSTR
,
buf
:
LP
W
STR
,
nsize
:
DWORD
,
args
:
*
c_void
)
->
DWORD
;
...
...
@@ -1173,11 +1174,11 @@ fn FormatMessageA(flags: DWORD,
let
langId
=
0x0800
as
DWORD
;
let
err
=
errno
()
as
DWORD
;
let
mut
buf
=
[
0
as
c_char
,
..
TMPBUF_SZ
];
let
mut
buf
=
[
0
as
WCHAR
,
..
TMPBUF_SZ
];
unsafe
{
do
buf
.as_mut_buf
|
buf
,
len
|
{
let
res
=
FormatMessage
A
(
FORMAT_MESSAGE_FROM_SYSTEM
|
let
res
=
FormatMessage
W
(
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
ptr
::
mut_null
(),
err
,
...
...
@@ -1190,9 +1191,7 @@ fn FormatMessageA(flags: DWORD,
}
}
do
buf
.as_imm_buf
|
buf
,
_
len
|
{
str
::
raw
::
from_c_str
(
buf
)
}
str
::
from_utf16
(
buf
)
}
}
...
...
src/libstd/rt/io/file.rs
浏览文件 @
0ec4d34b
...
...
@@ -168,7 +168,6 @@ fn file_test_smoke_test_impl() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8810
fn
file_test_io_smoke_test
()
{
file_test_smoke_test_impl
();
}
...
...
@@ -236,7 +235,6 @@ fn file_test_io_non_positional_read_impl() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8810
fn
file_test_io_non_positional_read
()
{
file_test_io_non_positional_read_impl
();
}
...
...
@@ -268,8 +266,8 @@ fn file_test_io_seeking_impl() {
assert
!
(
tell_pos_post_read
==
message
.len
()
as
u64
);
}
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8810
fn
file_test_io_seek_and_tell_smoke_test
()
{
file_test_io_seeking_impl
();
}
...
...
@@ -300,8 +298,8 @@ fn file_test_io_seek_and_write_impl() {
assert
!
(
read_str
==
final_msg
.to_owned
());
}
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8810
fn
file_test_io_seek_and_write
()
{
file_test_io_seek_and_write_impl
();
}
...
...
@@ -340,8 +338,8 @@ fn file_test_io_seek_shakedown_impl() {
unlink
(
filename
);
}
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8810
fn
file_test_io_seek_shakedown
()
{
file_test_io_seek_shakedown_impl
();
}
src/libstd/rt/io/net/tcp.rs
浏览文件 @
0ec4d34b
...
...
@@ -178,12 +178,17 @@ fn bind_error() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8811
fn
connect_error
()
{
do
run_in_mt_newsched_task
{
let
mut
called
=
false
;
do
io_error
::
cond
.trap
(|
e
|
{
assert_eq!
(
e
.kind
,
ConnectionRefused
);
let
expected_error
=
if
cfg!
(
unix
)
{
ConnectionRefused
}
else
{
// On Win32, opening port 1 gives WSAEADDRNOTAVAIL error.
OtherIoError
};
assert_eq!
(
e
.kind
,
expected_error
);
called
=
true
;
})
.inside
{
let
addr
=
SocketAddr
{
ip
:
Ipv4Addr
(
0
,
0
,
0
,
0
),
port
:
1
};
...
...
src/libstd/rt/io/support.rs
浏览文件 @
0ec4d34b
...
...
@@ -33,9 +33,8 @@ mod test {
use
super
::
PathLike
;
#[test]
#[ignore(cfg(windows))]
// FIXME #8812
fn
path_like_smoke_test
()
{
let
expected
=
"/home"
;
let
expected
=
if
cfg!
(
unix
)
{
"/home"
}
else
{
"C:
\\
"
}
;
let
path
=
Path
(
expected
);
path
.path_as_str
(|
p
|
assert
!
(
p
==
expected
));
path
.path_as_str
(|
p
|
assert
!
(
p
==
expected
));
...
...
src/libstd/rt/uv/file.rs
浏览文件 @
0ec4d34b
...
...
@@ -408,13 +408,11 @@ fn file_test_full_simple_impl_sync() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8814
fn
file_test_full_simple
()
{
file_test_full_simple_impl
();
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8814
fn
file_test_full_simple_sync
()
{
file_test_full_simple_impl_sync
();
}
...
...
src/libstd/rt/uv/uvio.rs
浏览文件 @
0ec4d34b
...
...
@@ -1740,7 +1740,6 @@ fn test_read_read_read() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8816
fn
test_udp_twice
()
{
do
run_in_mt_newsched_task
{
let
server_addr
=
next_test_ip4
();
...
...
@@ -1892,7 +1891,6 @@ fn file_test_uvio_full_simple_impl() {
}
#[test]
#[ignore(cfg(windows))]
// FIXME #8816
fn
file_test_uvio_full_simple
()
{
do
run_in_mt_newsched_task
{
file_test_uvio_full_simple_impl
();
...
...
src/libstd/rt/uv/uvll.rs
浏览文件 @
0ec4d34b
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录