go.sys: update package names
Semi-automatic migration from package syscall to package {plan9,windows,unix}.
No builds attempted yet, but this gets a lot of noise behind us so subsequent
CLs will be more concise and easier to follow.
Subsequent CLs will have semantic content.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/121520043
diff --git a/windows/asm_windows_386.s b/windows/asm_windows_386.s
index 8b52fa9..68402f3 100644
--- a/windows/asm_windows_386.s
+++ b/windows/asm_windows_386.s
@@ -3,5 +3,5 @@
// license that can be found in the LICENSE file.
//
-// System calls for 386, Windows are implemented in ../runtime/syscall_windows.goc
+// System calls for 386, Windows are implemented in runtime/syscall_windows.goc
//
diff --git a/windows/asm_windows_amd64.s b/windows/asm_windows_amd64.s
index 5813404..db38548 100644
--- a/windows/asm_windows_amd64.s
+++ b/windows/asm_windows_amd64.s
@@ -3,5 +3,5 @@
// license that can be found in the LICENSE file.
//
-// System calls for amd64, Windows are implemented in ../runtime/syscall_windows.goc
+// System calls for amd64, Windows are implemented in runtime/syscall_windows.goc
//
diff --git a/windows/dll_windows.go b/windows/dll_windows.go
index d29e992..68f7d3e 100644
--- a/windows/dll_windows.go
+++ b/windows/dll_windows.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
import (
"sync"
@@ -19,14 +19,14 @@
func (e *DLLError) Error() string { return e.Msg }
-// Implemented in ../runtime/syscall_windows.goc.
+// Implemented in runtime/syscall_windows.goc.
func Syscall(trap, nargs, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
func Syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
func Syscall9(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
func Syscall12(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 uintptr) (r1, r2 uintptr, err Errno)
func Syscall15(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2 uintptr, err Errno)
-func loadlibrary(filename *uint16) (handle uintptr, err Errno)
-func getprocaddress(handle uintptr, procname *uint8) (proc uintptr, err Errno)
+func loadlibrary(filename *uint16) (handle uintptr, err Errno) // TODO: must be exported.
+func getprocaddress(handle uintptr, procname *uint8) (proc uintptr, err Errno) // TODO: must be exported.
// A DLL implements access to a single DLL.
type DLL struct {
@@ -120,7 +120,7 @@
// The returned error is always non-nil, constructed from the result of GetLastError.
// Callers must inspect the primary return value to decide whether an error occurred
// (according to the semantics of the specific function being called) before consulting
-// the error. The error will be guaranteed to contain syscall.Errno.
+// the error. The error will be guaranteed to contain windows.Errno.
func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
switch len(a) {
case 0:
@@ -272,7 +272,7 @@
// The returned error is always non-nil, constructed from the result of GetLastError.
// Callers must inspect the primary return value to decide whether an error occurred
// (according to the semantics of the specific function being called) before consulting
-// the error. The error will be guaranteed to contain syscall.Errno.
+// the error. The error will be guaranteed to contain windows.Errno.
func (p *LazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
p.mustFind()
return p.proc.Call(a...)
diff --git a/windows/env_windows.go b/windows/env_windows.go
index 420b387..4789b9d 100644
--- a/windows/env_windows.go
+++ b/windows/env_windows.go
@@ -4,7 +4,7 @@
// Windows environment variables.
-package syscall
+package windows
import (
"unicode/utf16"
diff --git a/windows/exec_windows.go b/windows/exec_windows.go
index 82abc07..6e98dda 100644
--- a/windows/exec_windows.go
+++ b/windows/exec_windows.go
@@ -4,7 +4,7 @@
// Fork, exec, wait, etc.
-package syscall
+package windows
import (
"sync"
diff --git a/windows/mkall.sh b/windows/mkall.sh
index 886db13..cdecfc6 100755
--- a/windows/mkall.sh
+++ b/windows/mkall.sh
@@ -3,7 +3,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# The syscall package provides access to the raw system call
+# The windows package provides access to the raw system call
# interface of the underlying operating system. Porting Go to
# a new architecture/operating system combination requires
# some manual effort, though there are tools that automate
@@ -112,122 +112,6 @@
echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
exit 1
;;
-darwin_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- # Let the type of C char be singed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_amd64)
- unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-nacl_386)
- mkerrors=""
- mksyscall="./mksyscall.pl -l32 -nacl"
- mksysnum=""
- mktypes=""
- ;;
-nacl_amd64p32)
- mkerrors=""
- mksyscall="./mksyscall.pl -nacl"
- mksysnum=""
- mktypes=""
- ;;
-netbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-plan9_386)
- mkerrors=
- mksyscall="./mksyscall.pl -l32 -plan9"
- mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h"
- mktypes="XXX"
- ;;
-solaris_amd64)
- mksyscall="./mksyscall_solaris.pl"
- mkerrors="$mkerrors -m64"
- mksysnum=
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
windows_*)
mksyscall=
mkerrors=
@@ -247,15 +131,6 @@
echo "./mksyscall_windows syscall_windows.go security_windows.go syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"
echo "rm -f ./mksyscall_windows"
;;
- *)
- syscall_goos="syscall_$GOOS.go"
- case "$GOOS" in
- darwin | dragonfly | freebsd | netbsd | openbsd)
- syscall_goos="syscall_bsd.go $syscall_goos"
- ;;
- esac
- if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"; fi
- ;;
esac
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
diff --git a/windows/mksyscall.pl b/windows/mksyscall.pl
index 6d35fa6..817b4fe 100755
--- a/windows/mksyscall.pl
+++ b/windows/mksyscall.pl
@@ -4,7 +4,7 @@
# license that can be found in the LICENSE file.
# This program reads a file containing function prototypes
-# (like syscall_darwin.go) and generates system call bodies.
+# (like syscall_windows.go) and generates system call bodies.
# The prototypes are marked by lines beginning with "//sys"
# and read like func declarations if //sys is replaced by func, but:
# * The parameter lists must give a name for each argument.
@@ -304,7 +304,7 @@
// $cmdline
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-package syscall
+package windows
import "unsafe"
diff --git a/windows/mksyscall_windows.go b/windows/mksyscall_windows.go
index 1cdd6b4..38df6b7 100644
--- a/windows/mksyscall_windows.go
+++ b/windows/mksyscall_windows.go
@@ -69,11 +69,11 @@
return packageName
}
-func syscalldot() string {
- if packageName == "syscall" {
+func windowsdot() string {
+ if packageName == "windows" {
return ""
}
- return "syscall."
+ return "windows."
}
// Param is function parameter
@@ -265,7 +265,7 @@
if r.FailCond != "" {
cond = strings.Replace(r.FailCond, "failretval", retvar, 1)
}
- return fmt.Sprintf(code, cond, syscalldot())
+ return fmt.Sprintf(code, cond, windowsdot())
}
// SetErrorCode returns source code that sets return parameters.
@@ -280,7 +280,7 @@
return r.useLongHandleErrorCode("r1")
}
if r.Type == "error" {
- return fmt.Sprintf(code, r.Name, syscalldot())
+ return fmt.Sprintf(code, r.Name, windowsdot())
}
s := ""
switch {
@@ -297,7 +297,7 @@
return s + "\n\t" + r.useLongHandleErrorCode(r.Name)
}
-// Fn describes syscall function.
+// Fn describes a syscall function.
type Fn struct {
Name string
Params []*Param
@@ -493,9 +493,9 @@
func (f *Fn) Syscall() string {
c := f.SyscallParamCount()
if c == 3 {
- return syscalldot() + "Syscall"
+ return windowsdot() + "Syscall"
}
- return syscalldot() + "Syscall" + strconv.Itoa(c)
+ return windowsdot() + "Syscall" + strconv.Itoa(c)
}
// SyscallParamList returns source code for SyscallX parameters for function f.
@@ -520,9 +520,9 @@
// StrconvFunc returns name of Go string to OS string function for f.
func (f *Fn) StrconvFunc() string {
if f.IsUTF16() {
- return syscalldot() + "UTF16PtrFromString"
+ return windowsdot() + "UTF16PtrFromString"
}
- return syscalldot() + "BytePtrFromString"
+ return windowsdot() + "BytePtrFromString"
}
// StrconvType returns Go type name used for OS string for f.
@@ -619,7 +619,7 @@
// Generate output source file from a source set src.
func (src *Source) Generate(w io.Writer) error {
funcMap := template.FuncMap{
- "syscalldot": syscalldot,
+ "windowsdot": windowsdot,
"packagename": packagename,
}
t := template.Must(template.New("main").Funcs(funcMap).Parse(srcTemplate))
@@ -660,8 +660,8 @@
package {{packagename}}
-import "unsafe"{{if syscalldot}}
-import "syscall"{{end}}
+import "unsafe"{{if windowsdot}}
+import "windows"{{end}}
var (
{{template "dlls" .}}
@@ -671,7 +671,7 @@
{{/* help functions */}}
-{{define "dlls"}}{{range .DLLs}} mod{{.}} = {{syscalldot}}NewLazyDLL("{{.}}.dll")
+{{define "dlls"}}{{range .DLLs}} mod{{.}} = {{windowsdot}}NewLazyDLL("{{.}}.dll")
{{end}}{{end}}
{{define "funcnames"}}{{range .Funcs}} proc{{.DLLFuncName}} = mod{{.DLLName}}.NewProc("{{.DLLFuncName}}")
diff --git a/windows/race.go b/windows/race.go
index e69c111..8d763a4 100644
--- a/windows/race.go
+++ b/windows/race.go
@@ -4,7 +4,7 @@
// +build race
-package syscall
+package windows
import (
"runtime"
diff --git a/windows/race0.go b/windows/race0.go
index b02f882..dddd6f9 100644
--- a/windows/race0.go
+++ b/windows/race0.go
@@ -4,7 +4,7 @@
// +build !race
-package syscall
+package windows
import (
"unsafe"
diff --git a/windows/security_windows.go b/windows/security_windows.go
index b22ecf5..3902593 100644
--- a/windows/security_windows.go
+++ b/windows/security_windows.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
import (
"unsafe"
diff --git a/windows/str.go b/windows/str.go
index 0fce842..8ed679f 100644
--- a/windows/str.go
+++ b/windows/str.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
diff --git a/windows/syscall.go b/windows/syscall.go
index f7473fd..66b12ea 100644
--- a/windows/syscall.go
+++ b/windows/syscall.go
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package syscall contains an interface to the low-level operating system
-// primitives. The details vary depending on the underlying system, and
-// by default, godoc will display the syscall documentation for the current
+// Package windows contains an interface to the low-level operating system
+// primitives. OS details vary depending on the underlying system, and
+// by default, godoc will display the OS-specific documentation for the current
// system. If you want godoc to display syscall documentation for another
// system, set $GOOS and $GOARCH to the desired system. For example, if
// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
// to freebsd and $GOARCH to arm.
-// The primary use of syscall is inside other packages that provide a more
+// The primary use of this package is inside other packages that provide a more
// portable interface to the system, such as "os", "time" and "net". Use
// those packages rather than this one if you can.
// For details of the functions and data types in this package consult
// the manuals for the appropriate operating system.
// These calls return err == nil to indicate success; otherwise
// err is an operating system error describing the failure.
-// On most systems, that error has type syscall.Errno.
-package syscall
+// That error has type windows.Errno.
+package windows
// StringByteSlice is deprecated. Use ByteSliceFromString instead.
// If s contains a NUL byte this function panics instead of
@@ -25,7 +25,7 @@
func StringByteSlice(s string) []byte {
a, err := ByteSliceFromString(s)
if err != nil {
- panic("syscall: string with NUL passed to StringByteSlice")
+ panic("windows: string with NUL passed to StringByteSlice")
}
return a
}
diff --git a/windows/syscall_test.go b/windows/syscall_test.go
index 2a39b54..09e16bf 100644
--- a/windows/syscall_test.go
+++ b/windows/syscall_test.go
@@ -2,19 +2,19 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall_test
+package windows_test
import (
- "syscall"
"testing"
+ "windows"
)
func testSetGetenv(t *testing.T, key, value string) {
- err := syscall.Setenv(key, value)
+ err := windows.Setenv(key, value)
if err != nil {
t.Fatalf("Setenv failed to set %q: %v", value, err)
}
- newvalue, found := syscall.Getenv(key)
+ newvalue, found := windows.Getenv(key)
if !found {
t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value)
}
diff --git a/windows/syscall_windows.go b/windows/syscall_windows.go
index 1fe1ae0..ca9dc8a 100644
--- a/windows/syscall_windows.go
+++ b/windows/syscall_windows.go
@@ -4,7 +4,7 @@
// Windows system calls.
-package syscall
+package windows
import (
errorspkg "errors"
@@ -23,7 +23,7 @@
func StringToUTF16(s string) []uint16 {
a, err := UTF16FromString(s)
if err != nil {
- panic("syscall: string with NUL passed to StringToUTF16")
+ panic("windows: string with NUL passed to StringToUTF16")
}
return a
}
@@ -108,7 +108,7 @@
// Converts a Go function to a function pointer conforming
// to the stdcall or cdecl calling convention. This is useful when
// interoperating with Windows code requiring callbacks.
-// Implemented in ../runtime/syscall_windows.goc
+// Implemented in runtime/syscall_windows.goc
func NewCallback(fn interface{}) uintptr
func NewCallbackCDecl(fn interface{}) uintptr
@@ -816,7 +816,7 @@
func (w WaitStatus) TrapCause() int { return -1 }
// Timespec is an invented structure on Windows, but here for
-// consistency with the syscall package for other operating systems.
+// consistency with the corresponding package for other operating systems.
type Timespec struct {
Sec int64
Nsec int64
diff --git a/windows/syscall_windows_386.go b/windows/syscall_windows_386.go
index 61d2d8c..e512a36 100644
--- a/windows/syscall_windows_386.go
+++ b/windows/syscall_windows_386.go
@@ -2,4 +2,4 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
diff --git a/windows/syscall_windows_amd64.go b/windows/syscall_windows_amd64.go
index 61d2d8c..e512a36 100644
--- a/windows/syscall_windows_amd64.go
+++ b/windows/syscall_windows_amd64.go
@@ -2,4 +2,4 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
diff --git a/windows/syscall_windows_test.go b/windows/syscall_windows_test.go
index 86842f2..c7404f6 100644
--- a/windows/syscall_windows_test.go
+++ b/windows/syscall_windows_test.go
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall_test
+package windows_test
import (
"io/ioutil"
"os"
"path/filepath"
- "syscall"
"testing"
+ "windows"
)
func TestWin32finddata(t *testing.T) {
@@ -27,7 +27,7 @@
f.Close()
type X struct {
- fd syscall.Win32finddata
+ fd windows.Win32finddata
got byte
pad [10]byte // to protect ourselves
@@ -35,12 +35,12 @@
var want byte = 2 // it is unlikely to have this character in the filename
x := X{got: want}
- pathp, _ := syscall.UTF16PtrFromString(path)
- h, err := syscall.FindFirstFile(pathp, &(x.fd))
+ pathp, _ := windows.UTF16PtrFromString(path)
+ h, err := windows.FindFirstFile(pathp, &(x.fd))
if err != nil {
t.Fatalf("FindFirstFile failed: %v", err)
}
- err = syscall.FindClose(h)
+ err = windows.FindClose(h)
if err != nil {
t.Fatalf("FindClose failed: %v", err)
}
@@ -55,16 +55,16 @@
}
func ExampleLoadLibrary() {
- h, err := syscall.LoadLibrary("kernel32.dll")
+ h, err := windows.LoadLibrary("kernel32.dll")
if err != nil {
abort("LoadLibrary", err)
}
- defer syscall.FreeLibrary(h)
- proc, err := syscall.GetProcAddress(h, "GetVersion")
+ defer windows.FreeLibrary(h)
+ proc, err := windows.GetProcAddress(h, "GetVersion")
if err != nil {
abort("GetProcAddress", err)
}
- r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0)
+ r, _, _ := windows.Syscall(uintptr(proc), 0, 0, 0, 0)
major := byte(r)
minor := uint8(r >> 8)
build := uint16(r >> 16)
diff --git a/windows/zerrors_windows.go b/windows/zerrors_windows.go
index afdeae2..2e1ea31 100644
--- a/windows/zerrors_windows.go
+++ b/windows/zerrors_windows.go
@@ -1,7 +1,7 @@
// mkerrors_windows.sh -m32
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-package syscall
+package windows
// Go names for Windows errors.
const (
diff --git a/windows/zerrors_windows_386.go b/windows/zerrors_windows_386.go
index d1008bd..b71e1f7 100644
--- a/windows/zerrors_windows_386.go
+++ b/windows/zerrors_windows_386.go
@@ -2,4 +2,4 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
diff --git a/windows/zerrors_windows_amd64.go b/windows/zerrors_windows_amd64.go
index d1008bd..b71e1f7 100644
--- a/windows/zerrors_windows_amd64.go
+++ b/windows/zerrors_windows_amd64.go
@@ -2,4 +2,4 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
diff --git a/windows/zsyscall_windows_386.go b/windows/zsyscall_windows_386.go
index d55211e..d8bce22 100644
--- a/windows/zsyscall_windows_386.go
+++ b/windows/zsyscall_windows_386.go
@@ -1,7 +1,7 @@
// go build mksyscall_windows.go && ./mksyscall_windows syscall_windows.go security_windows.go syscall_windows_386.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-package syscall
+package windows
import "unsafe"
diff --git a/windows/zsyscall_windows_amd64.go b/windows/zsyscall_windows_amd64.go
index 47affab..b27267d 100644
--- a/windows/zsyscall_windows_amd64.go
+++ b/windows/zsyscall_windows_amd64.go
@@ -1,7 +1,7 @@
// go build mksyscall_windows.go && ./mksyscall_windows syscall_windows.go security_windows.go syscall_windows_amd64.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-package syscall
+package windows
import "unsafe"
diff --git a/windows/zsysnum_windows_386.go b/windows/zsysnum_windows_386.go
index 36bf065..c10a118 100644
--- a/windows/zsysnum_windows_386.go
+++ b/windows/zsysnum_windows_386.go
@@ -1,3 +1,3 @@
// nothing to see here
-package syscall
+package windows
diff --git a/windows/zsysnum_windows_amd64.go b/windows/zsysnum_windows_amd64.go
index 36bf065..c10a118 100644
--- a/windows/zsysnum_windows_amd64.go
+++ b/windows/zsysnum_windows_amd64.go
@@ -1,3 +1,3 @@
// nothing to see here
-package syscall
+package windows
diff --git a/windows/ztypes_windows.go b/windows/ztypes_windows.go
index 8b3625f..4efa75e 100644
--- a/windows/ztypes_windows.go
+++ b/windows/ztypes_windows.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
const (
// Windows errors.
diff --git a/windows/ztypes_windows_386.go b/windows/ztypes_windows_386.go
index 734ee6e..10f33be 100644
--- a/windows/ztypes_windows_386.go
+++ b/windows/ztypes_windows_386.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
type WSAData struct {
Version uint16
diff --git a/windows/ztypes_windows_amd64.go b/windows/ztypes_windows_amd64.go
index 78aa55b..3f272c2 100644
--- a/windows/ztypes_windows_amd64.go
+++ b/windows/ztypes_windows_amd64.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package syscall
+package windows
type WSAData struct {
Version uint16