go.sys/windows: grab Syscall interface from the standard syscall package

Also provide stubs to call loadlibrary and getprocaddress, which are implemented
for package syscall by runtime/syscall_windows.goc.
Should get the windows go.sys build closer to green.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/126170043
This commit is contained in:
Rob Pike
2014-08-13 14:08:39 -07:00
parent 9e072b55ca
commit 7118195da3
6 changed files with 315 additions and 310 deletions
+1 -4
View File
@@ -492,10 +492,7 @@ func (f *Fn) SyscallParamCount() int {
// Syscall determines which SyscallX function to use for function f.
func (f *Fn) Syscall() string {
c := f.SyscallParamCount()
if c == 3 {
return windowsdot() + "Syscall"
}
return windowsdot() + "Syscall" + strconv.Itoa(c)
return "syscall.Syscall" + strconv.Itoa(c)
}
// SyscallParamList returns source code for SyscallX parameters for function f.