Commit 73a4d379 authored by Rob Pike's avatar Rob Pike

go.sys/windows: import syscall

Simple oversight.

LGTM=alex.brainman
R=alex.brainman
CC=golang-codereviews, rsc
https://golang.org/cl/121660043
parent 9828c4df
......@@ -657,6 +657,7 @@ const srcTemplate = `
package {{packagename}}
import "syscall"
import "unsafe"{{if windowsdot}}
import "code.google.com/p/go.sys/windows"{{end}}
......
......@@ -9,6 +9,7 @@ package windows
import (
errorspkg "errors"
"sync"
"syscall"
"unicode/utf16"
"unsafe"
)
......@@ -762,7 +763,7 @@ func LoadConnectEx() error {
}
func connectEx(s Handle, name unsafe.Pointer, namelen int32, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) (err error) {
r1, _, e1 := Syscall9(connectExFunc.addr, 7, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), 0, 0)
r1, _, e1 := syscall.Syscall9(connectExFunc.addr, 7, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), 0, 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
......
......@@ -8,6 +8,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"syscall"
"testing"
"code.google.com/p/go.sys/windows"
......@@ -65,7 +66,7 @@ func ExampleLoadLibrary() {
if err != nil {
abort("GetProcAddress", err)
}
r, _, _ := windows.Syscall(uintptr(proc), 0, 0, 0, 0)
r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0)
major := byte(r)
minor := uint8(r >> 8)
build := uint16(r >> 16)
......
......@@ -3,6 +3,7 @@
package windows
import "syscall"
import "unsafe"
var (
......
......@@ -3,6 +3,7 @@
package windows
import "syscall"
import "unsafe"
var (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment