Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
d2f990f2
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,发现更多精彩内容 >>
提交
d2f990f2
编写于
2月 11, 2015
作者:
A
Alex Crichton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More test fixes and rebase conflicts
上级
adcda460
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
44 addition
and
2 deletion
+44
-2
src/libcore/slice.rs
src/libcore/slice.rs
+0
-1
src/libstd/sys/common/thread_local.rs
src/libstd/sys/common/thread_local.rs
+1
-0
src/libstd/sys/windows/c.rs
src/libstd/sys/windows/c.rs
+42
-0
src/libstd/sys/windows/net.rs
src/libstd/sys/windows/net.rs
+1
-1
未找到文件。
src/libcore/slice.rs
浏览文件 @
d2f990f2
...
...
@@ -41,7 +41,6 @@
use
cmp
;
use
default
::
Default
;
use
iter
::
*
;
use
num
::
Int
;
use
ops
::{
FnMut
,
self
,
Index
};
use
ops
::
RangeFull
;
use
option
::
Option
;
...
...
src/libstd/sys/common/thread_local.rs
浏览文件 @
d2f990f2
...
...
@@ -140,6 +140,7 @@ pub struct Key {
/// Constant initialization value for the inner part of static TLS keys.
///
/// This value allows specific configuration of the destructor for a TLS key.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
INIT_INNER
:
StaticKeyInner
=
StaticKeyInner
{
key
:
atomic
::
ATOMIC_USIZE_INIT
,
};
...
...
src/libstd/sys/windows/c.rs
浏览文件 @
d2f990f2
...
...
@@ -19,7 +19,9 @@
pub
use
libc
::
consts
::
os
::
extra
::{
FILE_ATTRIBUTE_READONLY
,
FILE_ATTRIBUTE_DIRECTORY
,
WSAPROTOCOL_LEN
,
};
pub
use
libc
::
types
::
os
::
arch
::
extra
::{
GROUP
,
GUID
,
WSAPROTOCOLCHAIN
};
pub
const
WSADESCRIPTION_LEN
:
usize
=
256
;
pub
const
WSASYS_STATUS_LEN
:
usize
=
128
;
...
...
@@ -41,6 +43,7 @@
pub
const
WSA_WAIT_TIMEOUT
:
libc
::
DWORD
=
libc
::
consts
::
os
::
extra
::
WAIT_TIMEOUT
;
pub
const
WSA_WAIT_EVENT_0
:
libc
::
DWORD
=
libc
::
consts
::
os
::
extra
::
WAIT_OBJECT_0
;
pub
const
WSA_WAIT_FAILED
:
libc
::
DWORD
=
libc
::
consts
::
os
::
extra
::
WAIT_FAILED
;
pub
const
WSAESHUTDOWN
:
libc
::
c_int
=
10058
;
pub
const
ERROR_NO_MORE_FILES
:
libc
::
DWORD
=
18
;
pub
const
TOKEN_READ
:
libc
::
DWORD
=
0x20008
;
...
...
@@ -80,6 +83,33 @@ pub struct WSANETWORKEVENTS {
pub
type
WSAEVENT
=
libc
::
HANDLE
;
#[repr(C)]
#[derive(Copy)]
pub
struct
WSAPROTOCOL_INFO
{
pub
dwServiceFlags1
:
libc
::
DWORD
,
pub
dwServiceFlags2
:
libc
::
DWORD
,
pub
dwServiceFlags3
:
libc
::
DWORD
,
pub
dwServiceFlags4
:
libc
::
DWORD
,
pub
dwProviderFlags
:
libc
::
DWORD
,
pub
ProviderId
:
GUID
,
pub
dwCatalogEntryId
:
libc
::
DWORD
,
pub
ProtocolChain
:
WSAPROTOCOLCHAIN
,
pub
iVersion
:
libc
::
c_int
,
pub
iAddressFamily
:
libc
::
c_int
,
pub
iMaxSockAddr
:
libc
::
c_int
,
pub
iMinSockAddr
:
libc
::
c_int
,
pub
iSocketType
:
libc
::
c_int
,
pub
iProtocol
:
libc
::
c_int
,
pub
iProtocolMaxOffset
:
libc
::
c_int
,
pub
iNetworkByteOrder
:
libc
::
c_int
,
pub
iSecurityScheme
:
libc
::
c_int
,
pub
dwMessageSize
:
libc
::
DWORD
,
pub
dwProviderReserved
:
libc
::
DWORD
,
pub
szProtocol
:
[
u16
;
(
WSAPROTOCOL_LEN
as
usize
)
+
1u
s
],
}
pub
type
LPWSAPROTOCOL_INFO
=
*
mut
WSAPROTOCOL_INFO
;
#[repr(C)]
pub
struct
fd_set
{
fd_count
:
libc
::
c_uint
,
...
...
@@ -184,6 +214,7 @@ pub struct FILE_END_OF_FILE_INFO {
extern
"system"
{
pub
fn
WSAStartup
(
wVersionRequested
:
libc
::
WORD
,
lpWSAData
:
LPWSADATA
)
->
libc
::
c_int
;
pub
fn
WSACleanup
()
->
libc
::
c_int
;
pub
fn
WSAGetLastError
()
->
libc
::
c_int
;
pub
fn
WSACloseEvent
(
hEvent
:
WSAEVENT
)
->
libc
::
BOOL
;
pub
fn
WSACreateEvent
()
->
WSAEVENT
;
...
...
@@ -200,6 +231,17 @@ pub fn WSAEnumNetworkEvents(s: libc::SOCKET,
hEventObject
:
WSAEVENT
,
lpNetworkEvents
:
LPWSANETWORKEVENTS
)
->
libc
::
c_int
;
pub
fn
WSADuplicateSocketW
(
s
:
libc
::
SOCKET
,
dwProcessId
:
libc
::
DWORD
,
lpProtocolInfo
:
LPWSAPROTOCOL_INFO
)
->
libc
::
c_int
;
pub
fn
GetCurrentProcessId
()
->
libc
::
DWORD
;
pub
fn
WSASocketW
(
af
:
libc
::
c_int
,
kind
:
libc
::
c_int
,
protocol
:
libc
::
c_int
,
lpProtocolInfo
:
LPWSAPROTOCOL_INFO
,
g
:
GROUP
,
dwFlags
:
libc
::
DWORD
)
->
libc
::
SOCKET
;
pub
fn
ioctlsocket
(
s
:
libc
::
SOCKET
,
cmd
:
libc
::
c_long
,
argp
:
*
mut
libc
::
c_ulong
)
->
libc
::
c_int
;
...
...
src/libstd/sys/windows/net.rs
浏览文件 @
d2f990f2
...
...
@@ -62,7 +62,7 @@ pub fn cvt_r<T: SignedInt, F>(mut f: F) -> io::Result<T> where F: FnMut() -> T {
impl
Socket
{
pub
fn
new
(
addr
:
&
SocketAddr
,
ty
:
c_int
)
->
io
::
Result
<
Socket
>
{
let
fam
=
match
addr
.ip
{
let
fam
=
match
addr
.ip
()
{
IpAddr
::
V4
(
..
)
=>
libc
::
AF_INET
,
IpAddr
::
V6
(
..
)
=>
libc
::
AF_INET6
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录