Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
2d5437ea
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2d5437ea
编写于
1月 18, 2013
作者:
J
jzavgren
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8005120: Compiler warnings in socket transport native code
Reviewed-by: chegar, dsamersoff
上级
0ce1caa0
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
43 addition
and
41 deletion
+43
-41
src/share/transport/socket/socketTransport.c
src/share/transport/socket/socketTransport.c
+4
-3
src/share/transport/socket/sysSocket.h
src/share/transport/socket/sysSocket.h
+12
-11
src/solaris/transport/socket/socket_md.c
src/solaris/transport/socket/socket_md.c
+11
-11
src/windows/transport/socket/socket_md.c
src/windows/transport/socket/socket_md.c
+16
-16
未找到文件。
src/share/transport/socket/socketTransport.c
浏览文件 @
2d5437ea
...
...
@@ -304,7 +304,7 @@ socketTransport_startListening(jdwpTransportEnv* env, const char* address,
{
char
buf
[
20
];
in
t
len
=
sizeof
(
sa
);
socklen_
t
len
=
sizeof
(
sa
);
jint
portNum
;
err
=
dbgsysGetSocketName
(
serverSocketFD
,
(
struct
sockaddr
*
)
&
sa
,
&
len
);
...
...
@@ -324,7 +324,8 @@ socketTransport_startListening(jdwpTransportEnv* env, const char* address,
static
jdwpTransportError
JNICALL
socketTransport_accept
(
jdwpTransportEnv
*
env
,
jlong
acceptTimeout
,
jlong
handshakeTimeout
)
{
int
socketLen
,
err
;
socklen_t
socketLen
;
int
err
;
struct
sockaddr_in
socket
;
jlong
startTime
=
(
jlong
)
0
;
...
...
@@ -508,7 +509,7 @@ socketTransport_close(jdwpTransportEnv* env)
if
(
dbgsysSocketClose
(
fd
)
<
0
)
{
/*
* close failed - it's pointless to restore socketFD here because
* any subsequent close will likely fail aswell.
* any subsequent close will likely fail as
well.
*/
RETURN_IO_ERROR
(
"close failed"
);
}
...
...
src/share/transport/socket/sysSocket.h
浏览文件 @
2d5437ea
...
...
@@ -34,28 +34,29 @@
#define DBG_EINPROGRESS -150
#define DBG_ETIMEOUT -200
#ifdef WIN32
typedef
int
socklen_t
;
#endif
int
dbgsysSocketClose
(
int
fd
);
int
dbgsysConnect
(
int
fd
,
struct
sockaddr
*
him
,
int
len
);
int
dbgsysFinishConnect
(
int
fd
,
long
timeout
);
int
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
him
,
int
*
len
);
int
dbgsysSendTo
(
int
fd
,
char
*
buf
,
int
len
,
int
flags
,
struct
sockaddr
*
to
,
int
tolen
);
int
dbgsysRecvFrom
(
int
fd
,
char
*
buf
,
int
nbytes
,
int
flags
,
struct
sockaddr
*
from
,
int
*
fromlen
);
int
dbgsysConnect
(
int
fd
,
struct
sockaddr
*
him
,
socklen_t
len
);
int
dbgsysFinishConnect
(
int
fd
,
int
timeout
);
int
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
him
,
socklen_t
*
len
);
int
dbgsysSendTo
(
int
fd
,
char
*
buf
,
size_t
len
,
int
flags
,
struct
sockaddr
*
to
,
socklen_t
tolen
);
int
dbgsysRecvFrom
(
int
fd
,
char
*
buf
,
size_t
nBytes
,
int
flags
,
struct
sockaddr
*
from
,
socklen_t
*
fromlen
);
int
dbgsysListen
(
int
fd
,
int
backlog
);
int
dbgsysRecv
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
);
int
dbgsysSend
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
);
int
dbgsysRecv
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
);
int
dbgsysSend
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
);
struct
hostent
*
dbgsysGetHostByName
(
char
*
hostname
);
int
dbgsysSocket
(
int
domain
,
int
type
,
int
protocol
);
int
dbgsysBind
(
int
fd
,
struct
sockaddr
*
name
,
in
t
namelen
);
int
dbgsysBind
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
namelen
);
int
dbgsysSetSocketOption
(
int
fd
,
jint
cmd
,
jboolean
on
,
jvalue
value
);
uint32_t
dbgsysInetAddr
(
const
char
*
cp
);
uint32_t
dbgsysHostToNetworkLong
(
uint32_t
hostlong
);
unsigned
short
dbgsysHostToNetworkShort
(
unsigned
short
hostshort
);
uint32_t
dbgsysNetworkToHostLong
(
uint32_t
netlong
);
unsigned
short
dbgsysNetworkToHostShort
(
unsigned
short
netshort
);
int
dbgsysGetSocketName
(
int
fd
,
struct
sockaddr
*
him
,
in
t
*
len
);
int
dbgsysGetSocketName
(
int
fd
,
struct
sockaddr
*
him
,
socklen_
t
*
len
);
int
dbgsysConfigureBlocking
(
int
fd
,
jboolean
blocking
);
int
dbgsysPoll
(
int
fd
,
jboolean
rd
,
jboolean
wr
,
long
timeout
);
int
dbgsysGetLastIOError
(
char
*
buf
,
jint
size
);
...
...
src/solaris/transport/socket/socket_md.c
浏览文件 @
2d5437ea
...
...
@@ -49,7 +49,7 @@ dbgsysListen(int fd, int backlog) {
}
int
dbgsysConnect
(
int
fd
,
struct
sockaddr
*
name
,
in
t
namelen
)
{
dbgsysConnect
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
namelen
)
{
int
rv
=
connect
(
fd
,
name
,
namelen
);
if
(
rv
<
0
&&
(
errno
==
EINPROGRESS
||
errno
==
EINTR
))
{
return
DBG_EINPROGRESS
;
...
...
@@ -59,7 +59,7 @@ dbgsysConnect(int fd, struct sockaddr *name, int namelen) {
}
int
dbgsysFinishConnect
(
int
fd
,
long
timeout
)
{
dbgsysFinishConnect
(
int
fd
,
int
timeout
)
{
int
rv
=
dbgsysPoll
(
fd
,
0
,
1
,
timeout
);
if
(
rv
==
0
)
{
return
DBG_ETIMEOUT
;
...
...
@@ -71,7 +71,7 @@ dbgsysFinishConnect(int fd, long timeout) {
}
int
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
name
,
in
t
*
namelen
)
{
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
*
namelen
)
{
int
rv
;
for
(;;)
{
rv
=
accept
(
fd
,
name
,
namelen
);
...
...
@@ -85,8 +85,8 @@ dbgsysAccept(int fd, struct sockaddr *name, int *namelen) {
}
int
dbgsysRecvFrom
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
,
struct
sockaddr
*
from
,
in
t
*
fromlen
)
{
dbgsysRecvFrom
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
,
struct
sockaddr
*
from
,
socklen_
t
*
fromlen
)
{
int
rv
;
do
{
rv
=
recvfrom
(
fd
,
buf
,
nBytes
,
flags
,
from
,
fromlen
);
...
...
@@ -96,8 +96,8 @@ dbgsysRecvFrom(int fd, char *buf, int nBytes,
}
int
dbgsysSendTo
(
int
fd
,
char
*
buf
,
in
t
len
,
int
flags
,
struct
sockaddr
*
to
,
in
t
tolen
)
{
dbgsysSendTo
(
int
fd
,
char
*
buf
,
size_
t
len
,
int
flags
,
struct
sockaddr
*
to
,
socklen_
t
tolen
)
{
int
rv
;
do
{
rv
=
sendto
(
fd
,
buf
,
len
,
flags
,
to
,
tolen
);
...
...
@@ -107,7 +107,7 @@ dbgsysSendTo(int fd, char *buf, int len,
}
int
dbgsysRecv
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
)
{
dbgsysRecv
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
)
{
int
rv
;
do
{
rv
=
recv
(
fd
,
buf
,
nBytes
,
flags
);
...
...
@@ -117,7 +117,7 @@ dbgsysRecv(int fd, char *buf, int nBytes, int flags) {
}
int
dbgsysSend
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
)
{
dbgsysSend
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
)
{
int
rv
;
do
{
rv
=
send
(
fd
,
buf
,
nBytes
,
flags
);
...
...
@@ -151,7 +151,7 @@ int dbgsysSocketClose(int fd) {
}
int
dbgsysBind
(
int
fd
,
struct
sockaddr
*
name
,
in
t
namelen
)
{
dbgsysBind
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
namelen
)
{
return
bind
(
fd
,
name
,
namelen
);
}
...
...
@@ -171,7 +171,7 @@ dbgsysNetworkToHostShort(unsigned short netshort) {
}
int
dbgsysGetSocketName
(
int
fd
,
struct
sockaddr
*
name
,
in
t
*
namelen
)
{
dbgsysGetSocketName
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
*
namelen
)
{
return
getsockname
(
fd
,
name
,
namelen
);
}
...
...
src/windows/transport/socket/socket_md.c
浏览文件 @
2d5437ea
...
...
@@ -125,7 +125,7 @@ dbgsysListen(int fd, int backlog) {
}
int
dbgsysConnect
(
int
fd
,
struct
sockaddr
*
name
,
in
t
namelen
)
{
dbgsysConnect
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
namelen
)
{
int
rv
=
connect
(
fd
,
name
,
namelen
);
if
(
rv
==
SOCKET_ERROR
)
{
if
(
WSAGetLastError
()
==
WSAEINPROGRESS
||
WSAGetLastError
()
==
WSAEWOULDBLOCK
)
{
...
...
@@ -135,7 +135,7 @@ dbgsysConnect(int fd, struct sockaddr *name, int namelen) {
return
rv
;
}
int
dbgsysFinishConnect
(
int
fd
,
long
timeout
)
{
int
dbgsysFinishConnect
(
int
fd
,
int
timeout
)
{
int
rv
;
struct
timeval
t
;
fd_set
wr
,
ex
;
...
...
@@ -171,30 +171,30 @@ int dbgsysFinishConnect(int fd, long timeout) {
int
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
name
,
in
t
*
namelen
)
{
dbgsysAccept
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
*
namelen
)
{
return
(
int
)
accept
(
fd
,
name
,
namelen
);
}
int
dbgsysRecvFrom
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
,
struct
sockaddr
*
from
,
in
t
*
fromlen
)
{
return
recvfrom
(
fd
,
buf
,
nBytes
,
flags
,
from
,
fromlen
);
dbgsysRecvFrom
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
,
struct
sockaddr
*
from
,
socklen_
t
*
fromlen
)
{
return
recvfrom
(
fd
,
buf
,
(
int
)
nBytes
,
flags
,
from
,
fromlen
);
}
int
dbgsysSendTo
(
int
fd
,
char
*
buf
,
in
t
len
,
int
flags
,
struct
sockaddr
*
to
,
in
t
tolen
)
{
return
sendto
(
fd
,
buf
,
len
,
flags
,
to
,
tolen
);
dbgsysSendTo
(
int
fd
,
char
*
buf
,
size_
t
len
,
int
flags
,
struct
sockaddr
*
to
,
socklen_
t
tolen
)
{
return
sendto
(
fd
,
buf
,
(
int
)
len
,
flags
,
to
,
tolen
);
}
int
dbgsysRecv
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
)
{
return
recv
(
fd
,
buf
,
nBytes
,
flags
);
dbgsysRecv
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
)
{
return
recv
(
fd
,
buf
,
(
int
)
nBytes
,
flags
);
}
int
dbgsysSend
(
int
fd
,
char
*
buf
,
in
t
nBytes
,
int
flags
)
{
return
send
(
fd
,
buf
,
nBytes
,
flags
);
dbgsysSend
(
int
fd
,
char
*
buf
,
size_
t
nBytes
,
int
flags
)
{
return
send
(
fd
,
buf
,
(
int
)
nBytes
,
flags
);
}
struct
hostent
*
...
...
@@ -232,7 +232,7 @@ dbgsysSocketClose(int fd) {
/* Additions to original follow */
int
dbgsysBind
(
int
fd
,
struct
sockaddr
*
name
,
in
t
namelen
)
{
dbgsysBind
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
namelen
)
{
return
bind
(
fd
,
name
,
namelen
);
}
...
...
@@ -253,7 +253,7 @@ dbgsysNetworkToHostShort(unsigned short netshort) {
}
int
dbgsysGetSocketName
(
int
fd
,
struct
sockaddr
*
name
,
in
t
*
namelen
)
{
dbgsysGetSocketName
(
int
fd
,
struct
sockaddr
*
name
,
socklen_
t
*
namelen
)
{
return
getsockname
(
fd
,
name
,
namelen
);
}
...
...
@@ -426,7 +426,7 @@ dbgsysTlsGet(int index) {
}
#define FT2INT64(ft) \
((
long)(ft).dwHighDateTime << 32 | (long
)(ft).dwLowDateTime)
((
INT64)(ft).dwHighDateTime << 32 | (INT64
)(ft).dwLowDateTime)
long
dbgsysCurrentTimeMillis
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录