Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
35050455
Commit
35050455
authored
Jul 13, 2011
by
Wei Guangjing
Committed by
Russ Cox
Jul 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: windows/amd64 port
R=rsc, alex.brainman CC=golang-dev
https://golang.org/cl/3790044
parent
932db13e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
23 deletions
+40
-23
src/pkg/net/fd_windows.go
src/pkg/net/fd_windows.go
+1
-1
src/pkg/syscall/syscall_windows.go
src/pkg/syscall/syscall_windows.go
+1
-1
src/pkg/syscall/zsyscall_windows_386.go
src/pkg/syscall/zsyscall_windows_386.go
+1
-1
src/pkg/syscall/zsyscall_windows_amd64.go
src/pkg/syscall/zsyscall_windows_amd64.go
+1
-1
src/pkg/syscall/ztypes_windows.go
src/pkg/syscall/ztypes_windows.go
+2
-19
src/pkg/syscall/ztypes_windows_386.go
src/pkg/syscall/ztypes_windows_386.go
+17
-0
src/pkg/syscall/ztypes_windows_amd64.go
src/pkg/syscall/ztypes_windows_amd64.go
+17
-0
No files found.
src/pkg/net/fd_windows.go
View file @
35050455
...
...
@@ -493,7 +493,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (nfd *netFD, err os.
}
// Inherit properties of the listening socket.
e
=
syscall
.
Setsockopt
Int
(
s
,
syscall
.
SOL_SOCKET
,
syscall
.
SO_UPDATE_ACCEPT_CONTEXT
,
int
(
fd
.
sysfd
))
e
=
syscall
.
Setsockopt
(
s
,
syscall
.
SOL_SOCKET
,
syscall
.
SO_UPDATE_ACCEPT_CONTEXT
,
(
*
byte
)(
unsafe
.
Pointer
(
&
fd
.
sysfd
)),
int32
(
unsafe
.
Sizeof
(
fd
.
sysfd
)
))
if
e
!=
0
{
closesocket
(
s
)
return
nil
,
err
...
...
src/pkg/syscall/syscall_windows.go
View file @
35050455
...
...
@@ -594,7 +594,7 @@ func Socket(domain, typ, proto int) (fd Handle, errno int) {
func
SetsockoptInt
(
fd
Handle
,
level
,
opt
int
,
value
int
)
(
errno
int
)
{
v
:=
int32
(
value
)
return
int
(
s
etsockopt
(
fd
,
int32
(
level
),
int32
(
opt
),
(
*
byte
)(
unsafe
.
Pointer
(
&
v
)),
int32
(
unsafe
.
Sizeof
(
v
))))
return
int
(
S
etsockopt
(
fd
,
int32
(
level
),
int32
(
opt
),
(
*
byte
)(
unsafe
.
Pointer
(
&
v
)),
int32
(
unsafe
.
Sizeof
(
v
))))
}
func
Bind
(
fd
Handle
,
sa
Sockaddr
)
(
errno
int
)
{
...
...
src/pkg/syscall/zsyscall_windows_386.go
View file @
35050455
...
...
@@ -1076,7 +1076,7 @@ func socket(af int32, typ int32, protocol int32) (handle Handle, errno int) {
return
}
func
s
etsockopt
(
s
Handle
,
level
int32
,
optname
int32
,
optval
*
byte
,
optlen
int32
)
(
errno
int
)
{
func
S
etsockopt
(
s
Handle
,
level
int32
,
optname
int32
,
optval
*
byte
,
optlen
int32
)
(
errno
int
)
{
r1
,
_
,
e1
:=
Syscall6
(
procsetsockopt
,
5
,
uintptr
(
s
),
uintptr
(
level
),
uintptr
(
optname
),
uintptr
(
unsafe
.
Pointer
(
optval
)),
uintptr
(
optlen
),
0
)
if
int
(
r1
)
==
-
1
{
if
e1
!=
0
{
...
...
src/pkg/syscall/zsyscall_windows_amd64.go
View file @
35050455
...
...
@@ -1076,7 +1076,7 @@ func socket(af int32, typ int32, protocol int32) (handle Handle, errno int) {
return
}
func
s
etsockopt
(
s
Handle
,
level
int32
,
optname
int32
,
optval
*
byte
,
optlen
int32
)
(
errno
int
)
{
func
S
etsockopt
(
s
Handle
,
level
int32
,
optname
int32
,
optval
*
byte
,
optlen
int32
)
(
errno
int
)
{
r1
,
_
,
e1
:=
Syscall6
(
procsetsockopt
,
5
,
uintptr
(
s
),
uintptr
(
level
),
uintptr
(
optname
),
uintptr
(
unsafe
.
Pointer
(
optval
)),
uintptr
(
optlen
),
0
)
if
int
(
r1
)
==
-
1
{
if
e1
!=
0
{
...
...
src/pkg/syscall/ztypes_windows.go
View file @
35050455
...
...
@@ -212,8 +212,8 @@ type SecurityAttributes struct {
}
type
Overlapped
struct
{
Internal
uint
32
InternalHigh
uint
32
Internal
uint
ptr
InternalHigh
uint
ptr
Offset
uint32
OffsetHigh
uint32
HEvent
Handle
...
...
@@ -388,16 +388,6 @@ const (
WSASYS_STATUS_LEN
=
128
)
type
WSAData
struct
{
Version
uint16
HighVersion
uint16
Description
[
WSADESCRIPTION_LEN
+
1
]
byte
SystemStatus
[
WSASYS_STATUS_LEN
+
1
]
byte
MaxSockets
uint16
MaxUdpDg
uint16
VendorInfo
*
byte
}
type
WSABuf
struct
{
Len
uint32
Buf
*
byte
...
...
@@ -453,13 +443,6 @@ type Hostent struct {
AddrList
**
byte
}
type
Servent
struct
{
Name
*
byte
Aliases
**
byte
Port
uint16
Proto
*
byte
}
const
(
DNS_TYPE_A
=
0x0001
DNS_TYPE_NS
=
0x0002
...
...
src/pkg/syscall/ztypes_windows_386.go
View file @
35050455
...
...
@@ -3,3 +3,20 @@
// license that can be found in the LICENSE file.
package
syscall
type
WSAData
struct
{
Version
uint16
HighVersion
uint16
Description
[
WSADESCRIPTION_LEN
+
1
]
byte
SystemStatus
[
WSASYS_STATUS_LEN
+
1
]
byte
MaxSockets
uint16
MaxUdpDg
uint16
VendorInfo
*
byte
}
type
Servent
struct
{
Name
*
byte
Aliases
**
byte
Port
uint16
Proto
*
byte
}
src/pkg/syscall/ztypes_windows_amd64.go
View file @
35050455
...
...
@@ -3,3 +3,20 @@
// license that can be found in the LICENSE file.
package
syscall
type
WSAData
struct
{
Version
uint16
HighVersion
uint16
MaxSockets
uint16
MaxUdpDg
uint16
VendorInfo
*
byte
Description
[
WSADESCRIPTION_LEN
+
1
]
byte
SystemStatus
[
WSASYS_STATUS_LEN
+
1
]
byte
}
type
Servent
struct
{
Name
*
byte
Aliases
**
byte
Proto
*
byte
Port
uint16
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment