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/plan9/asm_plan9_386.s b/plan9/asm_plan9_386.s
index f8c07c4..fc67ed1 100644
--- a/plan9/asm_plan9_386.s
+++ b/plan9/asm_plan9_386.s
@@ -5,7 +5,7 @@
 // TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
 // so that go vet can check that they are correct.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: How to refer to this?
 
 //
 // System call support for 386, Plan 9
@@ -139,7 +139,7 @@
 	MOVL	AX, 28(SP)	// newoffset high
 	
 	SUBL	$8, SP
-	CALL	syscall·errstr(SB)
+	CALL	plan9·errstr(SB)
 	MOVL	SP, SI
 	ADDL	$8, SP	
 	JMP	copyresult6
diff --git a/plan9/asm_plan9_amd64.s b/plan9/asm_plan9_amd64.s
index 220ea68..41cb77e 100644
--- a/plan9/asm_plan9_amd64.s
+++ b/plan9/asm_plan9_amd64.s
@@ -5,7 +5,7 @@
 // TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
 // so that go vet can check that they are correct.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: How to refer to this?
 
 //
 // System call support for Plan 9
@@ -137,7 +137,7 @@
 	MOVQ	$-1, newoffset+40(SP)
 	
 	SUBQ	$16, SP
-	CALL	syscall·errstr(SB)
+	CALL	plan9·errstr(SB)
 	MOVQ	SP, SI
 	ADDQ	$16, SP	
 	JMP	copyresult6
diff --git a/plan9/dir_plan9.go b/plan9/dir_plan9.go
index 697bf54..0955e0c 100644
--- a/plan9/dir_plan9.go
+++ b/plan9/dir_plan9.go
@@ -4,7 +4,7 @@
 
 // Plan 9 directory marshalling. See intro(5).
 
-package syscall
+package plan9
 
 import "errors"
 
@@ -18,7 +18,7 @@
 type Qid struct {
 	Path uint64 // the file server's unique identification for the file
 	Vers uint32 // version number for given Path
-	Type uint8  // the type of the file (syscall.QTDIR for example)
+	Type uint8  // the type of the file (plan9.QTDIR for example)
 }
 
 // A Dir contains the metadata for a file.
@@ -54,7 +54,7 @@
 }
 
 // Null assigns special "don't touch" values to members of d to
-// avoid modifying them during syscall.Wstat.
+// avoid modifying them during plan9.Wstat.
 func (d *Dir) Null() { *d = nullDir }
 
 // Marshal encodes a 9P stat message corresponding to d into b
diff --git a/plan9/env_plan9.go b/plan9/env_plan9.go
index 9587ab5..1ff8838 100644
--- a/plan9/env_plan9.go
+++ b/plan9/env_plan9.go
@@ -4,7 +4,7 @@
 
 // Plan 9 environment variables.
 
-package syscall
+package plan9
 
 import (
 	"errors"
diff --git a/plan9/exec_plan9.go b/plan9/exec_plan9.go
index 45ee542..6d89f66 100644
--- a/plan9/exec_plan9.go
+++ b/plan9/exec_plan9.go
@@ -4,7 +4,7 @@
 
 // Fork, exec, wait, etc.
 
-package syscall
+package plan9
 
 import (
 	"runtime"
diff --git a/plan9/mkall.sh b/plan9/mkall.sh
index 886db13..9f73c60 100755
--- a/plan9/mkall.sh
+++ b/plan9/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 plan9 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,127 +112,12 @@
 	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=
-	zerrors=
-	;;
 *)
 	echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
 	exit 1
@@ -242,18 +127,8 @@
 (
 	if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
 	case "$GOOS" in
-	windows)
-		echo "GOOS= GOARCH= go build mksyscall_windows.go"
-		echo "./mksyscall_windows syscall_windows.go security_windows.go syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"
-		echo "rm -f ./mksyscall_windows"
-		;;
-	*)
+	plan9)
 		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
diff --git a/plan9/mkerrors.sh b/plan9/mkerrors.sh
index cf0afe0..052c86d 100755
--- a/plan9/mkerrors.sh
+++ b/plan9/mkerrors.sh
@@ -15,193 +15,6 @@
 
 uname=$(uname)
 
-includes_Darwin='
-#define _DARWIN_C_SOURCE
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/ptrace.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <termios.h>
-'
-
-includes_DragonFly='
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <net/ip_mroute/ip_mroute.h>
-'
-
-includes_FreeBSD='
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-
-#if __FreeBSD__ >= 10
-#define IFT_CARP	0xf8	// IFT_CARP is deprecated in FreeBSD 10
-#undef SIOCAIFADDR
-#define SIOCAIFADDR	_IOW(105, 26, struct oifaliasreq)	// ifaliasreq contains if_data
-#undef SIOCSIFPHYADDR
-#define SIOCSIFPHYADDR	_IOW(105, 70, struct oifaliasreq)	// ifaliasreq contains if_data
-#endif
-'
-
-includes_Linux='
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _FILE_OFFSET_BITS 64
-#define _GNU_SOURCE
-
-#include <bits/sockaddr.h>
-#include <sys/epoll.h>
-#include <sys/inotify.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/prctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <linux/if.h>
-#include <linux/if_arp.h>
-#include <linux/if_ether.h>
-#include <linux/if_tun.h>
-#include <linux/if_packet.h>
-#include <linux/if_addr.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
-#include <linux/reboot.h>
-#include <linux/rtnetlink.h>
-#include <linux/ptrace.h>
-#include <linux/sched.h>
-#include <linux/wait.h>
-#include <linux/icmpv6.h>
-#include <net/route.h>
-#include <termios.h>
-
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN    0x20000000
-#endif
-'
-
-includes_NetBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/termios.h>
-#include <sys/ttycom.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/if_ether.h>
-
-// Needed since <sys/param.h> refers to it...
-#define schedppq 1
-'
-
-includes_OpenBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/termios.h>
-#include <sys/ttycom.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/if_var.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/if_ether.h>
-#include <net/if_bridge.h>
-
-// We keep some constants not supported in OpenBSD 5.5 and beyond for
-// the promise of compatibility.
-#define EMUL_ENABLED		0x1
-#define EMUL_NATIVE		0x2
-#define IPV6_FAITH		0x1d
-#define IPV6_OPTIONS		0x1
-#define IPV6_RTHDR_STRICT	0x1
-#define IPV6_SOCKOPT_RESERVED1	0x3
-#define SIOCGIFGENERIC		0xc020693a
-#define SIOCSIFGENERIC		0x80206939
-#define WALTSIG			0x4
-'
-
-includes_SunOS='
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-'
-
 includes='
 #include <sys/types.h>
 #include <sys/file.h>
@@ -222,7 +35,7 @@
 
 # Write go tool cgo -godefs input.
 (
-	echo package syscall
+	echo package plan9
 	echo
 	echo '/*'
 	indirect="includes_$(uname)"
diff --git a/plan9/mksyscall.pl b/plan9/mksyscall.pl
index 6d35fa6..81c09ea 100755
--- a/plan9/mksyscall.pl
+++ b/plan9/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_plan9.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 plan9
 
 import "unsafe"
 
diff --git a/plan9/mksysnum_plan9.sh b/plan9/mksysnum_plan9.sh
index fc619f0..d798930 100755
--- a/plan9/mksysnum_plan9.sh
+++ b/plan9/mksysnum_plan9.sh
@@ -11,7 +11,7 @@
 // $COMMAND
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package plan9
 
 const(
 EOF
diff --git a/plan9/race.go b/plan9/race.go
index e69c111..c7344aa 100644
--- a/plan9/race.go
+++ b/plan9/race.go
@@ -4,7 +4,7 @@
 
 // +build race
 
-package syscall
+package plan9
 
 import (
 	"runtime"
diff --git a/plan9/race0.go b/plan9/race0.go
index b02f882..49cfb80 100644
--- a/plan9/race0.go
+++ b/plan9/race0.go
@@ -4,7 +4,7 @@
 
 // +build !race
 
-package syscall
+package plan9
 
 import (
 	"unsafe"
diff --git a/plan9/str.go b/plan9/str.go
index 0fce842..93a1777 100644
--- a/plan9/str.go
+++ b/plan9/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 plan9
 
 func itoa(val int) string { // do it here rather than with fmt to avoid dependency
 	if val < 0 {
diff --git a/plan9/syscall.go b/plan9/syscall.go
index f7473fd..22a6588 100644
--- a/plan9/syscall.go
+++ b/plan9/syscall.go
@@ -2,22 +2,21 @@
 // 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
-// system.  If you want godoc to display syscall documentation for another
+// Package plan9 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 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
+// err represents an operating system error describing the failure.
+package plan9
 
 // StringByteSlice is deprecated. Use ByteSliceFromString instead.
 // If s contains a NUL byte this function panics instead of
diff --git a/plan9/syscall_plan9.go b/plan9/syscall_plan9.go
index ddd93ad..e813e3c 100644
--- a/plan9/syscall_plan9.go
+++ b/plan9/syscall_plan9.go
@@ -9,7 +9,7 @@
 // Note that sometimes we use a lowercase //sys name and
 // wrap it in our own nicer implementation.
 
-package syscall
+package plan9
 
 import "unsafe"
 
diff --git a/plan9/syscall_test.go b/plan9/syscall_test.go
index 2a39b54..1e7acb9 100644
--- a/plan9/syscall_test.go
+++ b/plan9/syscall_test.go
@@ -2,19 +2,20 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package syscall_test
+package plan9_test
 
 import (
-	"syscall"
 	"testing"
+
+	"code.google.com/p/go.sys/plan9"
 )
 
 func testSetGetenv(t *testing.T, key, value string) {
-	err := syscall.Setenv(key, value)
+	err := plan9.Setenv(key, value)
 	if err != nil {
 		t.Fatalf("Setenv failed to set %q: %v", value, err)
 	}
-	newvalue, found := syscall.Getenv(key)
+	newvalue, found := plan9.Getenv(key)
 	if !found {
 		t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value)
 	}
diff --git a/plan9/zerrors_plan9_386.go b/plan9/zerrors_plan9_386.go
index ede3d6a..de89ef6 100644
--- a/plan9/zerrors_plan9_386.go
+++ b/plan9/zerrors_plan9_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 plan9
 
 // Constants
 const (
diff --git a/plan9/zerrors_plan9_amd64.go b/plan9/zerrors_plan9_amd64.go
index ede3d6a..de89ef6 100644
--- a/plan9/zerrors_plan9_amd64.go
+++ b/plan9/zerrors_plan9_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 plan9
 
 // Constants
 const (
diff --git a/plan9/zsyscall_plan9_386.go b/plan9/zsyscall_plan9_386.go
index 5ffa0e4..0714cc2 100644
--- a/plan9/zsyscall_plan9_386.go
+++ b/plan9/zsyscall_plan9_386.go
@@ -1,7 +1,7 @@
 // mksyscall.pl -l32 -plan9 syscall_plan9.go syscall_plan9_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package plan9
 
 import "unsafe"
 
diff --git a/plan9/zsyscall_plan9_amd64.go b/plan9/zsyscall_plan9_amd64.go
index c64533f..4fc7b2e 100644
--- a/plan9/zsyscall_plan9_amd64.go
+++ b/plan9/zsyscall_plan9_amd64.go
@@ -1,7 +1,7 @@
 // mksyscall.pl -l32 -plan9 syscall_plan9.go syscall_plan9_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package plan9
 
 import "unsafe"
 
diff --git a/plan9/zsysnum_plan9_386.go b/plan9/zsysnum_plan9_386.go
index 07498c4..dbef7b9 100644
--- a/plan9/zsysnum_plan9_386.go
+++ b/plan9/zsysnum_plan9_386.go
@@ -1,7 +1,7 @@
 // mksysnum_plan9.sh /media/sys/src/libc/9syscall/sys.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package plan9
 
 const (
 	SYS_SYSR1       = 0
diff --git a/plan9/zsysnum_plan9_amd64.go b/plan9/zsysnum_plan9_amd64.go
index 07498c4..dbef7b9 100644
--- a/plan9/zsysnum_plan9_amd64.go
+++ b/plan9/zsysnum_plan9_amd64.go
@@ -1,7 +1,7 @@
 // mksysnum_plan9.sh /media/sys/src/libc/9syscall/sys.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package plan9
 
 const (
 	SYS_SYSR1       = 0
diff --git a/plan9/ztypes_plan9_386.go b/plan9/ztypes_plan9_386.go
index 3e3a8d1..1bf17a0 100644
--- a/plan9/ztypes_plan9_386.go
+++ b/plan9/ztypes_plan9_386.go
@@ -2,7 +2,7 @@
 
 // MACHINE GENERATED - DO NOT EDIT.
 
-package syscall
+package plan9
 
 // Constants
 const (
diff --git a/plan9/ztypes_plan9_amd64.go b/plan9/ztypes_plan9_amd64.go
index 3e3a8d1..1bf17a0 100644
--- a/plan9/ztypes_plan9_amd64.go
+++ b/plan9/ztypes_plan9_amd64.go
@@ -2,7 +2,7 @@
 
 // MACHINE GENERATED - DO NOT EDIT.
 
-package syscall
+package plan9
 
 // Constants
 const (
diff --git a/unix/asm_nacl_386.s b/unix/asm_nacl_386.s
index de7c3cc..9ea1dc0 100644
--- a/unix/asm_nacl_386.s
+++ b/unix/asm_nacl_386.s
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "../../cmd/ld/textflag.h"
-#include "../runtime/syscall_nacl.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
+#include "../runtime/syscall_nacl.h" // TODO: how to refer to this?
 
 //
 // System call support for 386, Native Client
@@ -15,7 +15,7 @@
 #define NACL_SYSJMP(code) \
 	MOVL $(0x10000 + ((code)<<5)), AX; JMP AX
 
-TEXT syscall·Syscall(SB),NOSPLIT,$12-28
+TEXT unix·Syscall(SB),NOSPLIT,$12-28
 	CALL	runtime·entersyscall(SB)
 	MOVL	trap+0(FP), AX
 	MOVL	a1+4(FP), BX
diff --git a/unix/asm_nacl_amd64p32.s b/unix/asm_nacl_amd64p32.s
index de030ec..48b4af3 100644
--- a/unix/asm_nacl_amd64p32.s
+++ b/unix/asm_nacl_amd64p32.s
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "../../cmd/ld/textflag.h"
-#include "../runtime/syscall_nacl.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
+#include "../runtime/syscall_nacl.h" // TODO: how to refer to this?
 
 //
 // System call support for amd64, Native Client
@@ -15,7 +15,7 @@
 #define NACL_SYSJMP(code) \
 	MOVL $(0x10000 + ((code)<<5)), AX; JMP AX
 
-TEXT syscall·Syscall(SB),NOSPLIT,$0-28
+TEXT unix·Syscall(SB),NOSPLIT,$0-28
 	CALL	runtime·entersyscall(SB)
 	MOVL	trap+0(FP), AX
 	MOVL	a1+4(FP), DI
diff --git a/unix/asm_nacl_arm.s b/unix/asm_nacl_arm.s
index ffc48ce..a62650c 100644
--- a/unix/asm_nacl_arm.s
+++ b/unix/asm_nacl_arm.s
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "../../cmd/ld/textflag.h"
-#include "../runtime/syscall_nacl.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
+#include "../runtime/syscall_nacl.h" // TODO: how to refer to this?
 
 //
 // System call support for ARM, Native Client
@@ -15,7 +15,7 @@
 #define NACL_SYSJMP(code) \
 	MOVW $(0x10000 + ((code)<<5)), R8; B (R8)
 
-TEXT syscall·Syscall(SB),NOSPLIT,$0-28
+TEXT unix·Syscall(SB),NOSPLIT,$0-28
 	BL	runtime·entersyscall(SB)
 	MOVW	trap+0(FP), R8
 	MOVW	a1+4(FP), R0
diff --git a/unix/asm_netbsd_386.s b/unix/asm_netbsd_386.s
index 40b30b4..01e1c33 100644
--- a/unix/asm_netbsd_386.s
+++ b/unix/asm_netbsd_386.s
@@ -5,7 +5,7 @@
 // TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
 // so that go vet can check that they are correct.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 //
 // System call support for 386, NetBSD
diff --git a/unix/asm_netbsd_amd64.s b/unix/asm_netbsd_amd64.s
index 94ad028..a1dfa4b 100644
--- a/unix/asm_netbsd_amd64.s
+++ b/unix/asm_netbsd_amd64.s
@@ -5,7 +5,7 @@
 // TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
 // so that go vet can check that they are correct.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 //
 // System call support for AMD64, NetBSD
diff --git a/unix/asm_netbsd_arm.s b/unix/asm_netbsd_arm.s
index 2c0d654..8e70145 100644
--- a/unix/asm_netbsd_arm.s
+++ b/unix/asm_netbsd_arm.s
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 //
 // System call support for ARM, NetBSD
diff --git a/unix/asm_openbsd_386.s b/unix/asm_openbsd_386.s
index 7dd2e37..4351e43 100644
--- a/unix/asm_openbsd_386.s
+++ b/unix/asm_openbsd_386.s
@@ -5,7 +5,7 @@
 // TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
 // so that go vet can check that they are correct.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 //
 // System call support for 386, OpenBSD
diff --git a/unix/asm_openbsd_amd64.s b/unix/asm_openbsd_amd64.s
index e127bf2..31ea9b8 100644
--- a/unix/asm_openbsd_amd64.s
+++ b/unix/asm_openbsd_amd64.s
@@ -5,7 +5,7 @@
 // TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
 // so that go vet can check that they are correct.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 //
 // System call support for AMD64, OpenBSD
diff --git a/unix/asm_solaris_amd64.s b/unix/asm_solaris_amd64.s
index 3735890..d7c34ec 100644
--- a/unix/asm_solaris_amd64.s
+++ b/unix/asm_solaris_amd64.s
@@ -3,5 +3,5 @@
 // license that can be found in the LICENSE file.
 
 //
-// System calls for amd64, Solaris are implemented in ../runtime/syscall_solaris.goc
+// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.goc
 //
diff --git a/unix/bpf_bsd.go b/unix/bpf_bsd.go
index cc6c1e7..618ec3c 100644
--- a/unix/bpf_bsd.go
+++ b/unix/bpf_bsd.go
@@ -6,7 +6,7 @@
 
 // Berkeley packet filter for BSD variants
 
-package syscall
+package unix
 
 import (
 	"unsafe"
diff --git a/unix/creds_test.go b/unix/creds_test.go
index b1894c6..90e3080 100644
--- a/unix/creds_test.go
+++ b/unix/creds_test.go
@@ -4,14 +4,14 @@
 
 // +build linux
 
-package syscall_test
+package unix_test
 
 import (
 	"bytes"
 	"net"
 	"os"
-	"syscall"
 	"testing"
+	"unix"
 )
 
 // TestSCMCredentials tests the sending and receiving of credentials
@@ -19,14 +19,14 @@
 // sockets. The SO_PASSCRED socket option is enabled on the sending
 // socket for this to work.
 func TestSCMCredentials(t *testing.T) {
-	fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_STREAM, 0)
+	fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0)
 	if err != nil {
 		t.Fatalf("Socketpair: %v", err)
 	}
-	defer syscall.Close(fds[0])
-	defer syscall.Close(fds[1])
+	defer unix.Close(fds[0])
+	defer unix.Close(fds[1])
 
-	err = syscall.SetsockoptInt(fds[0], syscall.SOL_SOCKET, syscall.SO_PASSCRED, 1)
+	err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1)
 	if err != nil {
 		t.Fatalf("SetsockoptInt: %v", err)
 	}
@@ -49,14 +49,14 @@
 	}
 	defer cli.Close()
 
-	var ucred syscall.Ucred
+	var ucred unix.Ucred
 	if os.Getuid() != 0 {
 		ucred.Pid = int32(os.Getpid())
 		ucred.Uid = 0
 		ucred.Gid = 0
-		oob := syscall.UnixCredentials(&ucred)
+		oob := unix.UnixCredentials(&ucred)
 		_, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
-		if err.(*net.OpError).Err != syscall.EPERM {
+		if err.(*net.OpError).Err != unix.EPERM {
 			t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
 		}
 	}
@@ -64,7 +64,7 @@
 	ucred.Pid = int32(os.Getpid())
 	ucred.Uid = uint32(os.Getuid())
 	ucred.Gid = uint32(os.Getgid())
-	oob := syscall.UnixCredentials(&ucred)
+	oob := unix.UnixCredentials(&ucred)
 
 	// this is going to send a dummy byte
 	n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
@@ -99,11 +99,11 @@
 		t.Fatal("ReadMsgUnix oob bytes don't match")
 	}
 
-	scm, err := syscall.ParseSocketControlMessage(oob2)
+	scm, err := unix.ParseSocketControlMessage(oob2)
 	if err != nil {
 		t.Fatalf("ParseSocketControlMessage: %v", err)
 	}
-	newUcred, err := syscall.ParseUnixCredentials(&scm[0])
+	newUcred, err := unix.ParseUnixCredentials(&scm[0])
 	if err != nil {
 		t.Fatalf("ParseUnixCredentials: %v", err)
 	}
diff --git a/unix/env_unix.go b/unix/env_unix.go
index ad354ed..19223eb 100644
--- a/unix/env_unix.go
+++ b/unix/env_unix.go
@@ -6,7 +6,7 @@
 
 // Unix environment variables.
 
-package syscall
+package unix
 
 import "sync"
 
diff --git a/unix/exec_bsd.go b/unix/exec_bsd.go
index ff78f19..d45cb81 100644
--- a/unix/exec_bsd.go
+++ b/unix/exec_bsd.go
@@ -4,7 +4,7 @@
 
 // +build darwin dragonfly freebsd netbsd openbsd
 
-package syscall
+package unix
 
 import (
 	"runtime"
diff --git a/unix/exec_linux.go b/unix/exec_linux.go
index f27950f..f4ac170 100644
--- a/unix/exec_linux.go
+++ b/unix/exec_linux.go
@@ -4,7 +4,7 @@
 
 // +build linux
 
-package syscall
+package unix
 
 import (
 	"unsafe"
diff --git a/unix/exec_solaris.go b/unix/exec_solaris.go
index 97de6ca..a89f587 100644
--- a/unix/exec_solaris.go
+++ b/unix/exec_solaris.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 unix
 
 import (
 	"unsafe"
@@ -44,7 +44,7 @@
 // no rescheduling, no malloc calls, and no new stack segments.
 //
 // We call hand-crafted syscalls, implemented in
-// ../runtime/syscall_solaris.goc, rather than generated libc wrappers
+// runtime/syscall_solaris.goc, rather than generated libc wrappers
 // because we need to avoid lazy-loading the functions (might malloc,
 // split the stack, or acquire mutexes). We can't call RawSyscall
 // because it's not safe even for BSD-subsystem calls.
diff --git a/unix/exec_unix.go b/unix/exec_unix.go
index 890bfdc..00f284c 100644
--- a/unix/exec_unix.go
+++ b/unix/exec_unix.go
@@ -6,7 +6,7 @@
 
 // Fork, exec, wait, etc.
 
-package syscall
+package unix
 
 import (
 	"runtime"
diff --git a/unix/fd_nacl.go b/unix/fd_nacl.go
index 7432414..3f67bb4 100644
--- a/unix/fd_nacl.go
+++ b/unix/fd_nacl.go
@@ -7,7 +7,7 @@
 // Native Client allows, so we maintain our own file descriptor table exposed
 // to higher-level packages.
 
-package syscall
+package unix
 
 import (
 	"sync"
diff --git a/unix/flock.go b/unix/flock.go
index 62736ae..5ba9c7d 100644
--- a/unix/flock.go
+++ b/unix/flock.go
@@ -4,7 +4,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/flock_linux_32bit.go b/unix/flock_linux_32bit.go
index 500a973..362831c 100644
--- a/unix/flock_linux_32bit.go
+++ b/unix/flock_linux_32bit.go
@@ -4,7 +4,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package syscall
+package unix
 
 func init() {
 	// On 32-bit Linux systems, the fcntl syscall that matches Go's
diff --git a/unix/fs_nacl.go b/unix/fs_nacl.go
index 4abc9b8..e675b22 100644
--- a/unix/fs_nacl.go
+++ b/unix/fs_nacl.go
@@ -12,7 +12,7 @@
 //
 // TODO: Perhaps support symlinks, although they muck everything up.
 
-package syscall
+package unix
 
 import (
 	"sync"
diff --git a/unix/lsf_linux.go b/unix/lsf_linux.go
index ee07fea..a2aff89 100644
--- a/unix/lsf_linux.go
+++ b/unix/lsf_linux.go
@@ -4,7 +4,7 @@
 
 // Linux socket filter
 
-package syscall
+package unix
 
 import (
 	"unsafe"
diff --git a/unix/mkall.sh b/unix/mkall.sh
index 886db13..087ce05 100755
--- a/unix/mkall.sh
+++ b/unix/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 unix 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
@@ -216,23 +216,12 @@
 	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=
-	zerrors=
-	;;
 *)
 	echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
 	exit 1
@@ -242,11 +231,6 @@
 (
 	if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
 	case "$GOOS" in
-	windows)
-		echo "GOOS= GOARCH= go build mksyscall_windows.go"
-		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
diff --git a/unix/mksyscall.pl b/unix/mksyscall.pl
index 6d35fa6..3095bc8 100755
--- a/unix/mksyscall.pl
+++ b/unix/mksyscall.pl
@@ -304,7 +304,7 @@
 // $cmdline
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/mksyscall_solaris.pl b/unix/mksyscall_solaris.pl
index 130d043..f05c3de 100755
--- a/unix/mksyscall_solaris.pl
+++ b/unix/mksyscall_solaris.pl
@@ -264,7 +264,7 @@
 import "unsafe"
 EOF
 
-print "import \"syscall\"\n" if $package ne "syscall";
+print "import \"unix\"\n" if $package ne "unix";
 
 print <<EOF;
 
diff --git a/unix/mksysctl_openbsd.pl b/unix/mksysctl_openbsd.pl
index c2e2ea9..6f540ba 100755
--- a/unix/mksysctl_openbsd.pl
+++ b/unix/mksysctl_openbsd.pl
@@ -237,7 +237,7 @@
 // mksysctl_openbsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall;
+package unix;
 
 type mibentry struct {
 	ctlname string
diff --git a/unix/mksysnum_darwin.pl b/unix/mksysnum_darwin.pl
index e347043..7601fba 100755
--- a/unix/mksysnum_darwin.pl
+++ b/unix/mksysnum_darwin.pl
@@ -13,7 +13,7 @@
 // $command
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 EOF
diff --git a/unix/mksysnum_dragonfly.pl b/unix/mksysnum_dragonfly.pl
index 3eba3ab..25df4d3 100755
--- a/unix/mksysnum_dragonfly.pl
+++ b/unix/mksysnum_dragonfly.pl
@@ -14,7 +14,7 @@
 // $command
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 EOF
diff --git a/unix/mksysnum_freebsd.pl b/unix/mksysnum_freebsd.pl
index cd67578..ea165a6 100755
--- a/unix/mksysnum_freebsd.pl
+++ b/unix/mksysnum_freebsd.pl
@@ -14,7 +14,7 @@
 // $command
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 EOF
diff --git a/unix/mksysnum_linux.pl b/unix/mksysnum_linux.pl
index c7e5cf7..5204378 100755
--- a/unix/mksysnum_linux.pl
+++ b/unix/mksysnum_linux.pl
@@ -11,7 +11,7 @@
 // $command
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const(
 EOF
diff --git a/unix/mksysnum_netbsd.pl b/unix/mksysnum_netbsd.pl
index f1534ed..fc16fcc 100755
--- a/unix/mksysnum_netbsd.pl
+++ b/unix/mksysnum_netbsd.pl
@@ -14,7 +14,7 @@
 // $command
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 EOF
diff --git a/unix/mksysnum_openbsd.pl b/unix/mksysnum_openbsd.pl
index ad1ccc1..5dffa04 100755
--- a/unix/mksysnum_openbsd.pl
+++ b/unix/mksysnum_openbsd.pl
@@ -14,7 +14,7 @@
 // $command
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 EOF
diff --git a/unix/mmap_unix_test.go b/unix/mmap_unix_test.go
index 01f7783..fa808aa 100644
--- a/unix/mmap_unix_test.go
+++ b/unix/mmap_unix_test.go
@@ -4,19 +4,19 @@
 
 // +build darwin dragonfly freebsd linux netbsd openbsd
 
-package syscall_test
+package unix_test
 
 import (
-	"syscall"
 	"testing"
+	"unix"
 )
 
 func TestMmap(t *testing.T) {
-	b, err := syscall.Mmap(-1, 0, syscall.Getpagesize(), syscall.PROT_NONE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
+	b, err := unix.Mmap(-1, 0, unix.Getpagesize(), unix.PROT_NONE, unix.MAP_ANON|unix.MAP_PRIVATE)
 	if err != nil {
 		t.Fatalf("Mmap: %v", err)
 	}
-	if err := syscall.Munmap(b); err != nil {
+	if err := unix.Munmap(b); err != nil {
 		t.Fatalf("Munmap: %v", err)
 	}
 }
diff --git a/unix/net_nacl.go b/unix/net_nacl.go
index b9488f4..1498c11 100644
--- a/unix/net_nacl.go
+++ b/unix/net_nacl.go
@@ -6,7 +6,7 @@
 // The simulation is not particularly tied to NaCl,
 // but other systems have real networks.
 
-package syscall
+package unix
 
 import (
 	"sync"
diff --git a/unix/netlink_linux.go b/unix/netlink_linux.go
index 1b73dce..8cf8c78 100644
--- a/unix/netlink_linux.go
+++ b/unix/netlink_linux.go
@@ -4,7 +4,7 @@
 
 // Netlink sockets and messages
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/race.go b/unix/race.go
index e69c111..ba94fa9 100644
--- a/unix/race.go
+++ b/unix/race.go
@@ -4,7 +4,7 @@
 
 // +build race
 
-package syscall
+package unix
 
 import (
 	"runtime"
diff --git a/unix/race0.go b/unix/race0.go
index b02f882..ab7f2d3 100644
--- a/unix/race0.go
+++ b/unix/race0.go
@@ -4,7 +4,7 @@
 
 // +build !race
 
-package syscall
+package unix
 
 import (
 	"unsafe"
diff --git a/unix/route_bsd.go b/unix/route_bsd.go
index 48af587..7684a89 100644
--- a/unix/route_bsd.go
+++ b/unix/route_bsd.go
@@ -6,7 +6,7 @@
 
 // Routing sockets and messages
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/route_darwin.go b/unix/route_darwin.go
index ad27907..3cff546 100644
--- a/unix/route_darwin.go
+++ b/unix/route_darwin.go
@@ -4,7 +4,7 @@
 
 // Routing sockets and messages for Darwin
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/route_dragonfly.go b/unix/route_dragonfly.go
index 79190d2..63ac8cc 100644
--- a/unix/route_dragonfly.go
+++ b/unix/route_dragonfly.go
@@ -4,7 +4,7 @@
 
 // Routing sockets and messages for Dragonfly
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/route_freebsd.go b/unix/route_freebsd.go
index 15897b1..18e20e5 100644
--- a/unix/route_freebsd.go
+++ b/unix/route_freebsd.go
@@ -4,7 +4,7 @@
 
 // Routing sockets and messages for FreeBSD
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/route_freebsd_32bit.go b/unix/route_freebsd_32bit.go
index 93efddd..5bc1c86 100644
--- a/unix/route_freebsd_32bit.go
+++ b/unix/route_freebsd_32bit.go
@@ -4,7 +4,7 @@
 
 // +build freebsd,386 freebsd,arm
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/route_freebsd_64bit.go b/unix/route_freebsd_64bit.go
index 9377f2f..5f38638 100644
--- a/unix/route_freebsd_64bit.go
+++ b/unix/route_freebsd_64bit.go
@@ -4,7 +4,7 @@
 
 // +build freebsd,amd64
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/route_netbsd.go b/unix/route_netbsd.go
index 9883aeb..0c6cb2d 100644
--- a/unix/route_netbsd.go
+++ b/unix/route_netbsd.go
@@ -4,7 +4,7 @@
 
 // Routing sockets and messages for NetBSD
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/route_openbsd.go b/unix/route_openbsd.go
index 19f902d..f70e7e7 100644
--- a/unix/route_openbsd.go
+++ b/unix/route_openbsd.go
@@ -4,7 +4,7 @@
 
 // Routing sockets and messages for OpenBSD
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/so_solaris.go b/unix/so_solaris.go
index 659cd67..a81f653 100644
--- a/unix/so_solaris.go
+++ b/unix/so_solaris.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 unix
 
 import (
 	"sync"
@@ -19,12 +19,12 @@
 
 func (e *soError) Error() string { return e.Msg }
 
-// Implemented in ../runtime/syscall_solaris.goc.
-func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
-func dlclose(handle uintptr) (err Errno)
-func dlopen(name *uint8, mode uintptr) (handle uintptr, err Errno)
-func dlsym(handle uintptr, name *uint8) (proc uintptr, err Errno)
+// Implemented in runtime/syscall_solaris.goc.
+func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) // TODO: export
+func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)    // TODO: export
+func dlclose(handle uintptr) (err Errno)                                                    // TODO: export
+func dlopen(name *uint8, mode uintptr) (handle uintptr, err Errno)                          // TODO: export
+func dlsym(handle uintptr, name *uint8) (proc uintptr, err Errno)                           // TODO: export
 
 // A so implements access to a single shared library object.
 type so struct {
@@ -119,7 +119,7 @@
 // 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.
+// guaranteed to contain unix.Errno.
 func (p *proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
 	switch len(a) {
 	case 0:
@@ -253,7 +253,7 @@
 // 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.
+// guaranteed to contain unix.Errno.
 func (p *lazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
 	p.mustFind()
 	return p.proc.Call(a...)
diff --git a/unix/sockcmsg_linux.go b/unix/sockcmsg_linux.go
index a2e26a1..d9ff473 100644
--- a/unix/sockcmsg_linux.go
+++ b/unix/sockcmsg_linux.go
@@ -4,7 +4,7 @@
 
 // Socket control messages
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/sockcmsg_unix.go b/unix/sockcmsg_unix.go
index 045a012..6668bec 100644
--- a/unix/sockcmsg_unix.go
+++ b/unix/sockcmsg_unix.go
@@ -6,7 +6,7 @@
 
 // Socket control messages
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/srpc_nacl.go b/unix/srpc_nacl.go
index dd07373..d289415 100644
--- a/unix/srpc_nacl.go
+++ b/unix/srpc_nacl.go
@@ -5,7 +5,7 @@
 // Native Client SRPC message passing.
 // This code is needed to invoke SecureRandom, the NaCl equivalent of /dev/random.
 
-package syscall
+package unix
 
 import (
 	"errors"
diff --git a/unix/str.go b/unix/str.go
index 0fce842..e05c8e5 100644
--- a/unix/str.go
+++ b/unix/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 unix
 
 func itoa(val int) string { // do it here rather than with fmt to avoid dependency
 	if val < 0 {
diff --git a/unix/syscall.go b/unix/syscall.go
index f7473fd..4472ad8 100644
--- a/unix/syscall.go
+++ b/unix/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
-// system.  If you want godoc to display syscall documentation for another
+// Package unix contains an interface to the low-level operating system
+// primitives.  OS details vary depending on the underlying system, and
+// by default, godoc will display OS-specific documentation for the current
+// system.  If you want godoc to display OS 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
+// On Unix systems, that error has type unix.Errno.
+package unix
 
 // 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("unix: string with NUL passed to StringByteSlice")
 	}
 	return a
 }
@@ -61,7 +61,7 @@
 }
 
 // Single-word zero for use when we need a valid pointer to 0 bytes.
-// See mksyscall.pl.
+// See mkunix.pl.
 var _zero uintptr
 
 func (ts *Timespec) Unix() (sec int64, nsec int64) {
diff --git a/unix/syscall_bsd.go b/unix/syscall_bsd.go
index 2556fa8..27becad 100644
--- a/unix/syscall_bsd.go
+++ b/unix/syscall_bsd.go
@@ -10,7 +10,7 @@
 // used as input to mksyscall which parses the //sys
 // lines and generates system call stubs.
 
-package syscall
+package unix
 
 import (
 	"runtime"
diff --git a/unix/syscall_bsd_test.go b/unix/syscall_bsd_test.go
index c2ea089..a9d3bb0 100644
--- a/unix/syscall_bsd_test.go
+++ b/unix/syscall_bsd_test.go
@@ -4,28 +4,28 @@
 
 // +build darwin dragonfly freebsd openbsd
 
-package syscall_test
+package unix_test
 
 import (
-	"syscall"
 	"testing"
+	"unix"
 )
 
 const MNT_WAIT = 1
 
 func TestGetfsstat(t *testing.T) {
-	n, err := syscall.Getfsstat(nil, MNT_WAIT)
+	n, err := unix.Getfsstat(nil, MNT_WAIT)
 	if err != nil {
 		t.Fatal(err)
 	}
 
-	data := make([]syscall.Statfs_t, n)
-	n, err = syscall.Getfsstat(data, MNT_WAIT)
+	data := make([]unix.Statfs_t, n)
+	n, err = unix.Getfsstat(data, MNT_WAIT)
 	if err != nil {
 		t.Fatal(err)
 	}
 
-	empty := syscall.Statfs_t{}
+	empty := unix.Statfs_t{}
 	for _, stat := range data {
 		if stat == empty {
 			t.Fatal("an empty Statfs_t struct was returned")
diff --git a/unix/syscall_darwin.go b/unix/syscall_darwin.go
index 97414dc..13ff460 100644
--- a/unix/syscall_darwin.go
+++ b/unix/syscall_darwin.go
@@ -10,7 +10,7 @@
 // it in our own nicer implementation, either here or in
 // syscall_bsd.go or syscall_unix.go.
 
-package syscall
+package unix
 
 import (
 	errorspkg "errors"
diff --git a/unix/syscall_darwin_386.go b/unix/syscall_darwin_386.go
index 2074e7a..680e09d 100644
--- a/unix/syscall_darwin_386.go
+++ b/unix/syscall_darwin_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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_darwin_amd64.go b/unix/syscall_darwin_amd64.go
index 81b1fd3..45facc6 100644
--- a/unix/syscall_darwin_amd64.go
+++ b/unix/syscall_darwin_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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_dragonfly.go b/unix/syscall_dragonfly.go
index b17e77d..c2675de 100644
--- a/unix/syscall_dragonfly.go
+++ b/unix/syscall_dragonfly.go
@@ -10,7 +10,7 @@
 // it in our own nicer implementation, either here or in
 // syscall_bsd.go or syscall_unix.go.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/syscall_dragonfly_386.go b/unix/syscall_dragonfly_386.go
index ebd3d4c..eee983b 100644
--- a/unix/syscall_dragonfly_386.go
+++ b/unix/syscall_dragonfly_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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_dragonfly_amd64.go b/unix/syscall_dragonfly_amd64.go
index 70c2ffb..3d4b81b 100644
--- a/unix/syscall_dragonfly_amd64.go
+++ b/unix/syscall_dragonfly_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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_freebsd.go b/unix/syscall_freebsd.go
index 959d46b..70d478d 100644
--- a/unix/syscall_freebsd.go
+++ b/unix/syscall_freebsd.go
@@ -10,7 +10,7 @@
 // it in our own nicer implementation, either here or in
 // syscall_bsd.go or syscall_unix.go.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/syscall_freebsd_386.go b/unix/syscall_freebsd_386.go
index ebd3d4c..eee983b 100644
--- a/unix/syscall_freebsd_386.go
+++ b/unix/syscall_freebsd_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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_freebsd_amd64.go b/unix/syscall_freebsd_amd64.go
index 70c2ffb..3d4b81b 100644
--- a/unix/syscall_freebsd_amd64.go
+++ b/unix/syscall_freebsd_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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_freebsd_arm.go b/unix/syscall_freebsd_arm.go
index ab72871..e637512 100644
--- a/unix/syscall_freebsd_arm.go
+++ b/unix/syscall_freebsd_arm.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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go
index 36ba051..80a1ef8 100644
--- a/unix/syscall_linux.go
+++ b/unix/syscall_linux.go
@@ -9,7 +9,7 @@
 // Note that sometimes we use a lowercase //sys name and
 // wrap it in our own nicer implementation.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/syscall_linux_386.go b/unix/syscall_linux_386.go
index 3cb2019..6d826ff 100644
--- a/unix/syscall_linux_386.go
+++ b/unix/syscall_linux_386.go
@@ -5,7 +5,7 @@
 // TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
 // so that go vet can check that they are correct.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/syscall_linux_amd64.go b/unix/syscall_linux_amd64.go
index 74a89fb..4ee9f2e 100644
--- a/unix/syscall_linux_amd64.go
+++ b/unix/syscall_linux_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 unix
 
 //sys	Chown(path string, uid int, gid int) (err error)
 //sys	Fchown(fd int, uid int, gid int) (err error)
diff --git a/unix/syscall_linux_arm.go b/unix/syscall_linux_arm.go
index 3631b59..6fe014f 100644
--- a/unix/syscall_linux_arm.go
+++ b/unix/syscall_linux_arm.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 unix
 
 import "unsafe"
 
diff --git a/unix/syscall_nacl.go b/unix/syscall_nacl.go
index c2788b2..d0abd06 100644
--- a/unix/syscall_nacl.go
+++ b/unix/syscall_nacl.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 unix
 
 import (
 	"sync"
diff --git a/unix/syscall_nacl_386.go b/unix/syscall_nacl_386.go
index d12f8e2..aa6314a 100644
--- a/unix/syscall_nacl_386.go
+++ b/unix/syscall_nacl_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 unix
 
 type Timespec struct {
 	Sec  int64
diff --git a/unix/syscall_nacl_amd64p32.go b/unix/syscall_nacl_amd64p32.go
index d12f8e2..aa6314a 100644
--- a/unix/syscall_nacl_amd64p32.go
+++ b/unix/syscall_nacl_amd64p32.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 unix
 
 type Timespec struct {
 	Sec  int64
diff --git a/unix/syscall_nacl_arm.go b/unix/syscall_nacl_arm.go
index fc0cdda..a54fbe1 100644
--- a/unix/syscall_nacl_arm.go
+++ b/unix/syscall_nacl_arm.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 unix
 
 type Timespec struct {
 	Sec  int64
diff --git a/unix/syscall_netbsd.go b/unix/syscall_netbsd.go
index 9781271..862ef58 100644
--- a/unix/syscall_netbsd.go
+++ b/unix/syscall_netbsd.go
@@ -10,7 +10,7 @@
 // it in our own nicer implementation, either here or in
 // syscall_bsd.go or syscall_unix.go.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/syscall_netbsd_386.go b/unix/syscall_netbsd_386.go
index 2dbff07..bf73fff 100644
--- a/unix/syscall_netbsd_386.go
+++ b/unix/syscall_netbsd_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 unix
 
 func Getpagesize() int { return 4096 }
 
diff --git a/unix/syscall_netbsd_amd64.go b/unix/syscall_netbsd_amd64.go
index 5784db9..474a092 100644
--- a/unix/syscall_netbsd_amd64.go
+++ b/unix/syscall_netbsd_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 unix
 
 func Getpagesize() int { return 4096 }
 
diff --git a/unix/syscall_netbsd_arm.go b/unix/syscall_netbsd_arm.go
index 659698a..3c6755b 100644
--- a/unix/syscall_netbsd_arm.go
+++ b/unix/syscall_netbsd_arm.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 unix
 
 func Getpagesize() int { return 4096 }
 
diff --git a/unix/syscall_no_getwd.go b/unix/syscall_no_getwd.go
index 0080c5c..530792e 100644
--- a/unix/syscall_no_getwd.go
+++ b/unix/syscall_no_getwd.go
@@ -4,7 +4,7 @@
 
 // +build dragonfly freebsd netbsd openbsd
 
-package syscall
+package unix
 
 const ImplementsGetwd = false
 
diff --git a/unix/syscall_openbsd.go b/unix/syscall_openbsd.go
index a46f6ae..cca56b9 100644
--- a/unix/syscall_openbsd.go
+++ b/unix/syscall_openbsd.go
@@ -10,7 +10,7 @@
 // it in our own nicer implementation, either here or in
 // syscall_bsd.go or syscall_unix.go.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/syscall_openbsd_386.go b/unix/syscall_openbsd_386.go
index ad5ae14..23b665c 100644
--- a/unix/syscall_openbsd_386.go
+++ b/unix/syscall_openbsd_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 unix
 
 func Getpagesize() int { return 4096 }
 
diff --git a/unix/syscall_openbsd_amd64.go b/unix/syscall_openbsd_amd64.go
index 6181344..e551353 100644
--- a/unix/syscall_openbsd_amd64.go
+++ b/unix/syscall_openbsd_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 unix
 
 func Getpagesize() int { return 4096 }
 
diff --git a/unix/syscall_solaris.go b/unix/syscall_solaris.go
index adc52b1..e29ec03 100644
--- a/unix/syscall_solaris.go
+++ b/unix/syscall_solaris.go
@@ -10,7 +10,7 @@
 // it in our own nicer implementation, either here or in
 // syscall_solaris.go or syscall_unix.go.
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/syscall_solaris_amd64.go b/unix/syscall_solaris_amd64.go
index 37cf06d..4795f52 100644
--- a/unix/syscall_solaris_amd64.go
+++ b/unix/syscall_solaris_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 unix
 
 func Getpagesize() int { return 4096 }
 
diff --git a/unix/syscall_test.go b/unix/syscall_test.go
index 2a39b54..8973172 100644
--- a/unix/syscall_test.go
+++ b/unix/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 unix_test
 
 import (
-	"syscall"
 	"testing"
+	"unix"
 )
 
 func testSetGetenv(t *testing.T, key, value string) {
-	err := syscall.Setenv(key, value)
+	err := unix.Setenv(key, value)
 	if err != nil {
 		t.Fatalf("Setenv failed to set %q: %v", value, err)
 	}
-	newvalue, found := syscall.Getenv(key)
+	newvalue, found := unix.Getenv(key)
 	if !found {
 		t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value)
 	}
diff --git a/unix/syscall_unix.go b/unix/syscall_unix.go
index f18dfca..31336ca 100644
--- a/unix/syscall_unix.go
+++ b/unix/syscall_unix.go
@@ -4,7 +4,7 @@
 
 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
 
-package syscall
+package unix
 
 import (
 	"runtime"
diff --git a/unix/syscall_unix_test.go b/unix/syscall_unix_test.go
index a0afb91..302899f 100644
--- a/unix/syscall_unix_test.go
+++ b/unix/syscall_unix_test.go
@@ -4,7 +4,7 @@
 
 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
 
-package syscall_test
+package unix_test
 
 import (
 	"flag"
@@ -15,9 +15,9 @@
 	"os/exec"
 	"path/filepath"
 	"runtime"
-	"syscall"
 	"testing"
 	"time"
+	"unix"
 )
 
 // Tests that below functions, structures and constants are consistent
@@ -25,25 +25,25 @@
 func _() {
 	// program scheduling priority functions and constants
 	var (
-		_ func(int, int, int) error   = syscall.Setpriority
-		_ func(int, int) (int, error) = syscall.Getpriority
+		_ func(int, int, int) error   = unix.Setpriority
+		_ func(int, int) (int, error) = unix.Getpriority
 	)
 	const (
-		_ int = syscall.PRIO_USER
-		_ int = syscall.PRIO_PROCESS
-		_ int = syscall.PRIO_PGRP
+		_ int = unix.PRIO_USER
+		_ int = unix.PRIO_PROCESS
+		_ int = unix.PRIO_PGRP
 	)
 
 	// termios constants
 	const (
-		_ int = syscall.TCIFLUSH
-		_ int = syscall.TCIOFLUSH
-		_ int = syscall.TCOFLUSH
+		_ int = unix.TCIFLUSH
+		_ int = unix.TCIOFLUSH
+		_ int = unix.TCOFLUSH
 	)
 
 	// fcntl file locking structure and constants
 	var (
-		_ = syscall.Flock_t{
+		_ = unix.Flock_t{
 			Type:   int16(0),
 			Whence: int16(0),
 			Start:  int64(0),
@@ -52,9 +52,9 @@
 		}
 	)
 	const (
-		_ = syscall.F_GETLK
-		_ = syscall.F_SETLK
-		_ = syscall.F_SETLKW
+		_ = unix.F_GETLK
+		_ = unix.F_SETLK
+		_ = unix.F_SETLKW
 	)
 }
 
@@ -62,17 +62,17 @@
 // the calling convention of each kernel.
 func TestFcntlFlock(t *testing.T) {
 	name := filepath.Join(os.TempDir(), "TestFcntlFlock")
-	fd, err := syscall.Open(name, syscall.O_CREAT|syscall.O_RDWR|syscall.O_CLOEXEC, 0)
+	fd, err := unix.Open(name, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0)
 	if err != nil {
 		t.Fatalf("Open failed: %v", err)
 	}
-	defer syscall.Unlink(name)
-	defer syscall.Close(fd)
-	flock := syscall.Flock_t{
-		Type:  syscall.F_RDLCK,
+	defer unix.Unlink(name)
+	defer unix.Close(fd)
+	flock := unix.Flock_t{
+		Type:  unix.F_RDLCK,
 		Start: 0, Len: 0, Whence: 1,
 	}
-	if err := syscall.FcntlFlock(uintptr(fd), syscall.F_GETLK, &flock); err != nil {
+	if err := unix.FcntlFlock(uintptr(fd), unix.F_GETLK, &flock); err != nil {
 		t.Fatalf("FcntlFlock failed: %v", err)
 	}
 }
@@ -104,12 +104,12 @@
 	}
 	defer os.RemoveAll(tempDir)
 
-	fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_STREAM, 0)
+	fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0)
 	if err != nil {
 		t.Fatalf("Socketpair: %v", err)
 	}
-	defer syscall.Close(fds[0])
-	defer syscall.Close(fds[1])
+	defer unix.Close(fds[0])
+	defer unix.Close(fds[1])
 	writeFile := os.NewFile(uintptr(fds[0]), "child-writes")
 	readFile := os.NewFile(uintptr(fds[1]), "parent-reads")
 	defer writeFile.Close()
@@ -144,7 +144,7 @@
 	_, oobn, _, _, err := uc.ReadMsgUnix(buf, oob)
 	closeUnix.Stop()
 
-	scms, err := syscall.ParseSocketControlMessage(oob[:oobn])
+	scms, err := unix.ParseSocketControlMessage(oob[:oobn])
 	if err != nil {
 		t.Fatalf("ParseSocketControlMessage: %v", err)
 	}
@@ -152,9 +152,9 @@
 		t.Fatalf("expected 1 SocketControlMessage; got scms = %#v", scms)
 	}
 	scm := scms[0]
-	gotFds, err := syscall.ParseUnixRights(&scm)
+	gotFds, err := unix.ParseUnixRights(&scm)
 	if err != nil {
-		t.Fatalf("syscall.ParseUnixRights: %v", err)
+		t.Fatalf("unix.ParseUnixRights: %v", err)
 	}
 	if len(gotFds) != 1 {
 		t.Fatalf("wanted 1 fd; got %#v", gotFds)
@@ -204,7 +204,7 @@
 	f.Write([]byte("Hello from child process!\n"))
 	f.Seek(0, 0)
 
-	rights := syscall.UnixRights(int(f.Fd()))
+	rights := unix.UnixRights(int(f.Fd()))
 	dummyByte := []byte("x")
 	n, oobn, err := uc.WriteMsgUnix(dummyByte, rights, nil)
 	if err != nil {
@@ -232,13 +232,13 @@
 		var n int
 		for _, fds := range testCase {
 			// Last assignment to n wins
-			n = len(b) + syscall.CmsgLen(4*len(fds))
-			b = append(b, syscall.UnixRights(fds...)...)
+			n = len(b) + unix.CmsgLen(4*len(fds))
+			b = append(b, unix.UnixRights(fds...)...)
 		}
 		// Truncate b
 		b = b[:n]
 
-		scms, err := syscall.ParseSocketControlMessage(b)
+		scms, err := unix.ParseSocketControlMessage(b)
 		if err != nil {
 			t.Fatalf("ParseSocketControlMessage: %v", err)
 		}
@@ -246,7 +246,7 @@
 			t.Fatalf("expected %v SocketControlMessage; got scms = %#v", len(testCase), scms)
 		}
 		for i, scm := range scms {
-			gotFds, err := syscall.ParseUnixRights(&scm)
+			gotFds, err := unix.ParseUnixRights(&scm)
 			if err != nil {
 				t.Fatalf("ParseUnixRights: %v", err)
 			}
@@ -264,8 +264,8 @@
 }
 
 func TestRlimit(t *testing.T) {
-	var rlimit, zero syscall.Rlimit
-	err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlimit)
+	var rlimit, zero unix.Rlimit
+	err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlimit)
 	if err != nil {
 		t.Fatalf("Getrlimit: save failed: %v", err)
 	}
@@ -274,12 +274,12 @@
 	}
 	set := rlimit
 	set.Cur = set.Max - 1
-	err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &set)
+	err = unix.Setrlimit(unix.RLIMIT_NOFILE, &set)
 	if err != nil {
 		t.Fatalf("Setrlimit: set failed: %#v %v", set, err)
 	}
-	var get syscall.Rlimit
-	err = syscall.Getrlimit(syscall.RLIMIT_NOFILE, &get)
+	var get unix.Rlimit
+	err = unix.Getrlimit(unix.RLIMIT_NOFILE, &get)
 	if err != nil {
 		t.Fatalf("Getrlimit: get failed: %v", err)
 	}
@@ -295,14 +295,14 @@
 			t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get)
 		}
 	}
-	err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rlimit)
+	err = unix.Setrlimit(unix.RLIMIT_NOFILE, &rlimit)
 	if err != nil {
 		t.Fatalf("Setrlimit: restore failed: %#v %v", rlimit, err)
 	}
 }
 
 func TestSeekFailure(t *testing.T) {
-	_, err := syscall.Seek(-1, 0, 0)
+	_, err := unix.Seek(-1, 0, 0)
 	if err == nil {
 		t.Fatalf("Seek(-1, 0, 0) did not fail")
 	}
diff --git a/unix/tables_nacl.go b/unix/tables_nacl.go
index 08f4ced..deb409a 100644
--- a/unix/tables_nacl.go
+++ b/unix/tables_nacl.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 unix
 
 // TODO: generate with runtime/mknacl.sh, allow override with IRT.
 const (
diff --git a/unix/time_nacl_386.s b/unix/time_nacl_386.s
index b5a22d3..d1fe6b1 100644
--- a/unix/time_nacl_386.s
+++ b/unix/time_nacl_386.s
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 TEXT ·startTimer(SB),NOSPLIT,$0
 	JMP time·startTimer(SB)
diff --git a/unix/time_nacl_amd64p32.s b/unix/time_nacl_amd64p32.s
index b5a22d3..d1fe6b1 100644
--- a/unix/time_nacl_amd64p32.s
+++ b/unix/time_nacl_amd64p32.s
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 TEXT ·startTimer(SB),NOSPLIT,$0
 	JMP time·startTimer(SB)
diff --git a/unix/time_nacl_arm.s b/unix/time_nacl_arm.s
index 99baaf5..35174b7 100644
--- a/unix/time_nacl_arm.s
+++ b/unix/time_nacl_arm.s
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-#include "../../cmd/ld/textflag.h"
+#include "../../cmd/ld/textflag.h" // TODO: how to refer to this?
 
 TEXT ·startTimer(SB),NOSPLIT,$0
 	B time·startTimer(SB)
diff --git a/unix/types_darwin.go b/unix/types_darwin.go
index a043071..2bb15cb 100644
--- a/unix/types_darwin.go
+++ b/unix/types_darwin.go
@@ -11,7 +11,7 @@
 // +godefs map struct_in_addr [4]byte /* in_addr */
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
 
-package syscall
+package unix
 
 /*
 #define __DARWIN_UNIX03 0
diff --git a/unix/types_dragonfly.go b/unix/types_dragonfly.go
index fb7fd1b..f3c971d 100644
--- a/unix/types_dragonfly.go
+++ b/unix/types_dragonfly.go
@@ -11,7 +11,7 @@
 // +godefs map struct_in_addr [4]byte /* in_addr */
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
 
-package syscall
+package unix
 
 /*
 #define KERNEL
diff --git a/unix/types_freebsd.go b/unix/types_freebsd.go
index 68a6931..20c84a5 100644
--- a/unix/types_freebsd.go
+++ b/unix/types_freebsd.go
@@ -11,7 +11,7 @@
 // +godefs map struct_in_addr [4]byte /* in_addr */
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
 
-package syscall
+package unix
 
 /*
 #define KERNEL
diff --git a/unix/types_linux.go b/unix/types_linux.go
index e8396a4..fc64e75 100644
--- a/unix/types_linux.go
+++ b/unix/types_linux.go
@@ -11,7 +11,7 @@
 // +godefs map struct_in_addr [4]byte /* in_addr */
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
 
-package syscall
+package unix
 
 /*
 #define _LARGEFILE_SOURCE
diff --git a/unix/types_netbsd.go b/unix/types_netbsd.go
index 04354a3..d15f93d 100644
--- a/unix/types_netbsd.go
+++ b/unix/types_netbsd.go
@@ -11,7 +11,7 @@
 // +godefs map struct_in_addr [4]byte /* in_addr */
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
 
-package syscall
+package unix
 
 /*
 #define KERNEL
diff --git a/unix/types_openbsd.go b/unix/types_openbsd.go
index e6d1ea7..b66fe25 100644
--- a/unix/types_openbsd.go
+++ b/unix/types_openbsd.go
@@ -11,7 +11,7 @@
 // +godefs map struct_in_addr [4]byte /* in_addr */
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
 
-package syscall
+package unix
 
 /*
 #define KERNEL
diff --git a/unix/types_solaris.go b/unix/types_solaris.go
index 53fa350..753c799 100644
--- a/unix/types_solaris.go
+++ b/unix/types_solaris.go
@@ -11,7 +11,7 @@
 // +godefs map struct_in_addr [4]byte /* in_addr */
 // +godefs map struct_in6_addr [16]byte /* in6_addr */
 
-package syscall
+package unix
 
 /*
 #define KERNEL
diff --git a/unix/unzip_nacl.go b/unix/unzip_nacl.go
index 5845e44..22afb06 100644
--- a/unix/unzip_nacl.go
+++ b/unix/unzip_nacl.go
@@ -7,7 +7,7 @@
 // and a modified copy of the zip reader in package time.
 // (The one in package time does not support decompression; this one does.)
 
-package syscall
+package unix
 
 const (
 	maxCodeLen = 16    // max length of Huffman code
diff --git a/unix/zerrors_darwin_386.go b/unix/zerrors_darwin_386.go
index bb3a161..e1c5c37 100644
--- a/unix/zerrors_darwin_386.go
+++ b/unix/zerrors_darwin_386.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m32 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_darwin_amd64.go b/unix/zerrors_darwin_amd64.go
index 05ab48e..b447da1 100644
--- a/unix/zerrors_darwin_amd64.go
+++ b/unix/zerrors_darwin_amd64.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m64 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_dragonfly_386.go b/unix/zerrors_dragonfly_386.go
index 701a1c3..f7a05af 100644
--- a/unix/zerrors_dragonfly_386.go
+++ b/unix/zerrors_dragonfly_386.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m32 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_dragonfly_amd64.go b/unix/zerrors_dragonfly_amd64.go
index 59bff75..b5f1693 100644
--- a/unix/zerrors_dragonfly_amd64.go
+++ b/unix/zerrors_dragonfly_amd64.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m64 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_freebsd_386.go b/unix/zerrors_freebsd_386.go
index cd3aa80..39944e0 100644
--- a/unix/zerrors_freebsd_386.go
+++ b/unix/zerrors_freebsd_386.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m32 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_freebsd_amd64.go b/unix/zerrors_freebsd_amd64.go
index 9edce6e..68b0257 100644
--- a/unix/zerrors_freebsd_amd64.go
+++ b/unix/zerrors_freebsd_amd64.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m64 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_freebsd_arm.go b/unix/zerrors_freebsd_arm.go
index f29dd05..0fc01b0 100644
--- a/unix/zerrors_freebsd_arm.go
+++ b/unix/zerrors_freebsd_arm.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_linux_386.go b/unix/zerrors_linux_386.go
index 7aa8ff0..fd59a3e 100644
--- a/unix/zerrors_linux_386.go
+++ b/unix/zerrors_linux_386.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m32 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_ALG                           = 0x26
diff --git a/unix/zerrors_linux_amd64.go b/unix/zerrors_linux_amd64.go
index 94d051d..d8c21a9 100644
--- a/unix/zerrors_linux_amd64.go
+++ b/unix/zerrors_linux_amd64.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m64 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_ALG                           = 0x26
diff --git a/unix/zerrors_linux_arm.go b/unix/zerrors_linux_arm.go
index dcaaef7..c90297d 100644
--- a/unix/zerrors_linux_arm.go
+++ b/unix/zerrors_linux_arm.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- _const.go
 
-package syscall
+package unix
 
 const (
 	AF_ALG                           = 0x26
diff --git a/unix/zerrors_netbsd_386.go b/unix/zerrors_netbsd_386.go
index 1e3dff7..7584d6a 100644
--- a/unix/zerrors_netbsd_386.go
+++ b/unix/zerrors_netbsd_386.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m32 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_netbsd_amd64.go b/unix/zerrors_netbsd_amd64.go
index 1469d00..d394084 100644
--- a/unix/zerrors_netbsd_amd64.go
+++ b/unix/zerrors_netbsd_amd64.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m64 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_netbsd_arm.go b/unix/zerrors_netbsd_arm.go
index 1a88c0d..aad6873 100644
--- a/unix/zerrors_netbsd_arm.go
+++ b/unix/zerrors_netbsd_arm.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -marm _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_openbsd_386.go b/unix/zerrors_openbsd_386.go
index 0829834..6dbc60d 100644
--- a/unix/zerrors_openbsd_386.go
+++ b/unix/zerrors_openbsd_386.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m32 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_openbsd_amd64.go b/unix/zerrors_openbsd_amd64.go
index e9fa37c..8dad02d 100644
--- a/unix/zerrors_openbsd_amd64.go
+++ b/unix/zerrors_openbsd_amd64.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m64 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_APPLETALK                      = 0x10
diff --git a/unix/zerrors_solaris_amd64.go b/unix/zerrors_solaris_amd64.go
index 3f4cbfd..194ea20 100644
--- a/unix/zerrors_solaris_amd64.go
+++ b/unix/zerrors_solaris_amd64.go
@@ -4,7 +4,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -m64 _const.go
 
-package syscall
+package unix
 
 const (
 	AF_802                        = 0x12
diff --git a/unix/zsyscall_darwin_386.go b/unix/zsyscall_darwin_386.go
index a6a176b..3dc16c0 100644
--- a/unix/zsyscall_darwin_386.go
+++ b/unix/zsyscall_darwin_386.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
+// mkunix.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_darwin_amd64.go b/unix/zsyscall_darwin_amd64.go
index f5867c4..cfe882f 100644
--- a/unix/zsyscall_darwin_amd64.go
+++ b/unix/zsyscall_darwin_amd64.go
@@ -1,7 +1,7 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
+// mkunix.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_dragonfly_386.go b/unix/zsyscall_dragonfly_386.go
index 94a716f..3039292 100644
--- a/unix/zsyscall_dragonfly_386.go
+++ b/unix/zsyscall_dragonfly_386.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_386.go
+// mkunix.pl -l32 -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_dragonfly_amd64.go b/unix/zsyscall_dragonfly_amd64.go
index 89c22ed..75ce80c 100644
--- a/unix/zsyscall_dragonfly_amd64.go
+++ b/unix/zsyscall_dragonfly_amd64.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
+// mkunix.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_freebsd_386.go b/unix/zsyscall_freebsd_386.go
index 61e4888..9aed2e6 100644
--- a/unix/zsyscall_freebsd_386.go
+++ b/unix/zsyscall_freebsd_386.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
+// mkunix.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_freebsd_amd64.go b/unix/zsyscall_freebsd_amd64.go
index 5e3afe1..6735369 100644
--- a/unix/zsyscall_freebsd_amd64.go
+++ b/unix/zsyscall_freebsd_amd64.go
@@ -1,7 +1,7 @@
-// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
+// mkunix.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_freebsd_arm.go b/unix/zsyscall_freebsd_arm.go
index da1f2d5..169c1ae 100644
--- a/unix/zsyscall_freebsd_arm.go
+++ b/unix/zsyscall_freebsd_arm.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
+// mkunix.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_linux_386.go b/unix/zsyscall_linux_386.go
index bfac416..93d2161 100644
--- a/unix/zsyscall_linux_386.go
+++ b/unix/zsyscall_linux_386.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
+// mkunix.pl -l32 syscall_linux.go syscall_linux_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_linux_amd64.go b/unix/zsyscall_linux_amd64.go
index 537b080..b7b1737 100644
--- a/unix/zsyscall_linux_amd64.go
+++ b/unix/zsyscall_linux_amd64.go
@@ -1,7 +1,7 @@
-// mksyscall.pl syscall_linux.go syscall_linux_amd64.go
+// mkunix.pl syscall_linux.go syscall_linux_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_linux_arm.go b/unix/zsyscall_linux_arm.go
index 3665a32..44c2772 100644
--- a/unix/zsyscall_linux_arm.go
+++ b/unix/zsyscall_linux_arm.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -arm syscall_linux.go syscall_linux_arm.go
+// mkunix.pl -l32 -arm syscall_linux.go syscall_linux_arm.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_nacl_386.go b/unix/zsyscall_nacl_386.go
index 32eed33..787787c 100644
--- a/unix/zsyscall_nacl_386.go
+++ b/unix/zsyscall_nacl_386.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -nacl syscall_nacl.go syscall_nacl_386.go
+// mkunix.pl -l32 -nacl syscall_nacl.go syscall_nacl_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_nacl_amd64p32.go b/unix/zsyscall_nacl_amd64p32.go
index 8bc81fa..430c7b0 100644
--- a/unix/zsyscall_nacl_amd64p32.go
+++ b/unix/zsyscall_nacl_amd64p32.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -nacl syscall_nacl.go syscall_nacl_amd64p32.go
+// mkunix.pl -nacl syscall_nacl.go syscall_nacl_amd64p32.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_nacl_arm.go b/unix/zsyscall_nacl_arm.go
index adbaed0..622850d 100644
--- a/unix/zsyscall_nacl_arm.go
+++ b/unix/zsyscall_nacl_arm.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -nacl -arm syscall_nacl.go syscall_nacl_arm.go
+// mkunix.pl -l32 -nacl -arm syscall_nacl.go syscall_nacl_arm.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_netbsd_386.go b/unix/zsyscall_netbsd_386.go
index 281208f..d4bb83d 100644
--- a/unix/zsyscall_netbsd_386.go
+++ b/unix/zsyscall_netbsd_386.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
+// mkunix.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_netbsd_amd64.go b/unix/zsyscall_netbsd_amd64.go
index ed9a87d..5baddfb 100644
--- a/unix/zsyscall_netbsd_amd64.go
+++ b/unix/zsyscall_netbsd_amd64.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
+// mkunix.pl -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_netbsd_arm.go b/unix/zsyscall_netbsd_arm.go
index c5c9a9f..fe641e5 100644
--- a/unix/zsyscall_netbsd_arm.go
+++ b/unix/zsyscall_netbsd_arm.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
+// mkunix.pl -l32 -arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_openbsd_386.go b/unix/zsyscall_openbsd_386.go
index 068a1fb..5887e2e 100644
--- a/unix/zsyscall_openbsd_386.go
+++ b/unix/zsyscall_openbsd_386.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -l32 -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
+// mkunix.pl -l32 -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_openbsd_amd64.go b/unix/zsyscall_openbsd_amd64.go
index 13dc093..9b597b6 100644
--- a/unix/zsyscall_openbsd_amd64.go
+++ b/unix/zsyscall_openbsd_amd64.go
@@ -1,7 +1,7 @@
-// mksyscall.pl -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
+// mkunix.pl -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsyscall_solaris_amd64.go b/unix/zsyscall_solaris_amd64.go
index 8847cad..02af974 100644
--- a/unix/zsyscall_solaris_amd64.go
+++ b/unix/zsyscall_solaris_amd64.go
@@ -1,7 +1,7 @@
 // mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go
 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 
-package syscall
+package unix
 
 import "unsafe"
 
diff --git a/unix/zsysctl_openbsd.go b/unix/zsysctl_openbsd.go
index 923b2c2..83bb935 100644
--- a/unix/zsysctl_openbsd.go
+++ b/unix/zsysctl_openbsd.go
@@ -1,7 +1,7 @@
 // mksysctl_openbsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 type mibentry struct {
 	ctlname string
diff --git a/unix/zsysnum_darwin_386.go b/unix/zsysnum_darwin_386.go
index abdef77..645426a 100644
--- a/unix/zsysnum_darwin_386.go
+++ b/unix/zsysnum_darwin_386.go
@@ -1,7 +1,7 @@
-// mksysnum_darwin.pl /usr/include/sys/syscall.h
+// mksysnum_darwin.pl /usr/include/sys/unix.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_SYSCALL                        = 0
diff --git a/unix/zsysnum_darwin_amd64.go b/unix/zsysnum_darwin_amd64.go
index abdef77..645426a 100644
--- a/unix/zsysnum_darwin_amd64.go
+++ b/unix/zsysnum_darwin_amd64.go
@@ -1,7 +1,7 @@
-// mksysnum_darwin.pl /usr/include/sys/syscall.h
+// mksysnum_darwin.pl /usr/include/sys/unix.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_SYSCALL                        = 0
diff --git a/unix/zsysnum_dragonfly_386.go b/unix/zsysnum_dragonfly_386.go
index 4b086b9..09c3515 100644
--- a/unix/zsysnum_dragonfly_386.go
+++ b/unix/zsysnum_dragonfly_386.go
@@ -1,7 +1,7 @@
 // mksysnum_dragonfly.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int
diff --git a/unix/zsysnum_dragonfly_amd64.go b/unix/zsysnum_dragonfly_amd64.go
index 4b086b9..09c3515 100644
--- a/unix/zsysnum_dragonfly_amd64.go
+++ b/unix/zsysnum_dragonfly_amd64.go
@@ -1,7 +1,7 @@
 // mksysnum_dragonfly.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int
diff --git a/unix/zsysnum_freebsd_386.go b/unix/zsysnum_freebsd_386.go
index dfca558..3359ced 100644
--- a/unix/zsysnum_freebsd_386.go
+++ b/unix/zsysnum_freebsd_386.go
@@ -1,7 +1,7 @@
 // mksysnum_freebsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int
diff --git a/unix/zsysnum_freebsd_amd64.go b/unix/zsysnum_freebsd_amd64.go
index dfca558..3359ced 100644
--- a/unix/zsysnum_freebsd_amd64.go
+++ b/unix/zsysnum_freebsd_amd64.go
@@ -1,7 +1,7 @@
 // mksysnum_freebsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int
diff --git a/unix/zsysnum_freebsd_arm.go b/unix/zsysnum_freebsd_arm.go
index dfca558..3359ced 100644
--- a/unix/zsysnum_freebsd_arm.go
+++ b/unix/zsysnum_freebsd_arm.go
@@ -1,7 +1,7 @@
 // mksysnum_freebsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	// SYS_NOSYS = 0;  // { int nosys(void); } syscall nosys_args int
diff --git a/unix/zsysnum_linux_386.go b/unix/zsysnum_linux_386.go
index c40b5f1..9a7d8b0 100644
--- a/unix/zsysnum_linux_386.go
+++ b/unix/zsysnum_linux_386.go
@@ -1,7 +1,7 @@
 // mksysnum_linux.pl /usr/include/asm/unistd_32.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_RESTART_SYSCALL        = 0
diff --git a/unix/zsysnum_linux_amd64.go b/unix/zsysnum_linux_amd64.go
index 7cf70a4..fa7d754 100644
--- a/unix/zsysnum_linux_amd64.go
+++ b/unix/zsysnum_linux_amd64.go
@@ -1,7 +1,7 @@
 // mksysnum_linux.pl /usr/include/asm/unistd_64.h
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_READ                   = 0
diff --git a/unix/zsysnum_linux_arm.go b/unix/zsysnum_linux_arm.go
index 7068e4e..e2b7d19 100644
--- a/unix/zsysnum_linux_arm.go
+++ b/unix/zsysnum_linux_arm.go
@@ -1,7 +1,7 @@
 // mksysnum_linux.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_OABI_SYSCALL_BASE      = 0
diff --git a/unix/zsysnum_netbsd_386.go b/unix/zsysnum_netbsd_386.go
index c570965..bf00385 100644
--- a/unix/zsysnum_netbsd_386.go
+++ b/unix/zsysnum_netbsd_386.go
@@ -1,7 +1,7 @@
 // mksysnum_netbsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_EXIT                 = 1   // { void|sys||exit(int rval); }
diff --git a/unix/zsysnum_netbsd_amd64.go b/unix/zsysnum_netbsd_amd64.go
index c570965..bf00385 100644
--- a/unix/zsysnum_netbsd_amd64.go
+++ b/unix/zsysnum_netbsd_amd64.go
@@ -1,7 +1,7 @@
 // mksysnum_netbsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_EXIT                 = 1   // { void|sys||exit(int rval); }
diff --git a/unix/zsysnum_netbsd_arm.go b/unix/zsysnum_netbsd_arm.go
index c570965..bf00385 100644
--- a/unix/zsysnum_netbsd_arm.go
+++ b/unix/zsysnum_netbsd_arm.go
@@ -1,7 +1,7 @@
 // mksysnum_netbsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_EXIT                 = 1   // { void|sys||exit(int rval); }
diff --git a/unix/zsysnum_openbsd_386.go b/unix/zsysnum_openbsd_386.go
index 3b9ac4c..a3cae50 100644
--- a/unix/zsysnum_openbsd_386.go
+++ b/unix/zsysnum_openbsd_386.go
@@ -1,7 +1,7 @@
 // mksysnum_openbsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_EXIT           = 1   // { void sys_exit(int rval); }
diff --git a/unix/zsysnum_openbsd_amd64.go b/unix/zsysnum_openbsd_amd64.go
index 3b9ac4c..a3cae50 100644
--- a/unix/zsysnum_openbsd_amd64.go
+++ b/unix/zsysnum_openbsd_amd64.go
@@ -1,7 +1,7 @@
 // mksysnum_openbsd.pl
 // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
 
-package syscall
+package unix
 
 const (
 	SYS_EXIT           = 1   // { void sys_exit(int rval); }
diff --git a/unix/zsysnum_solaris_amd64.go b/unix/zsysnum_solaris_amd64.go
index 43b3d8b..da00f9e 100644
--- a/unix/zsysnum_solaris_amd64.go
+++ b/unix/zsysnum_solaris_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 unix
 
 // TODO(aram): remove these before Go 1.3.
 const (
diff --git a/unix/ztypes_darwin_386.go b/unix/ztypes_darwin_386.go
index 13724c3..75dc532 100644
--- a/unix/ztypes_darwin_386.go
+++ b/unix/ztypes_darwin_386.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_darwin.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_darwin_amd64.go b/unix/ztypes_darwin_amd64.go
index 65b02ae..93d6d28 100644
--- a/unix/ztypes_darwin_amd64.go
+++ b/unix/ztypes_darwin_amd64.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_darwin.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x8
diff --git a/unix/ztypes_dragonfly_386.go b/unix/ztypes_dragonfly_386.go
index 6b6ec15..e1b97ff 100644
--- a/unix/ztypes_dragonfly_386.go
+++ b/unix/ztypes_dragonfly_386.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_dragonfly.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_dragonfly_amd64.go b/unix/ztypes_dragonfly_amd64.go
index 954ffd7..b94a4ff 100644
--- a/unix/ztypes_dragonfly_amd64.go
+++ b/unix/ztypes_dragonfly_amd64.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_dragonfly.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x8
diff --git a/unix/ztypes_freebsd_386.go b/unix/ztypes_freebsd_386.go
index b809eea..d9d5ce4 100644
--- a/unix/ztypes_freebsd_386.go
+++ b/unix/ztypes_freebsd_386.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_freebsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_freebsd_amd64.go b/unix/ztypes_freebsd_amd64.go
index a05908a..80c6b81 100644
--- a/unix/ztypes_freebsd_amd64.go
+++ b/unix/ztypes_freebsd_amd64.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_freebsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x8
diff --git a/unix/ztypes_freebsd_arm.go b/unix/ztypes_freebsd_arm.go
index 9303816..bd971b5 100644
--- a/unix/ztypes_freebsd_arm.go
+++ b/unix/ztypes_freebsd_arm.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs -- -fsigned-char types_freebsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_linux_386.go b/unix/ztypes_linux_386.go
index daecb1d..f1ce93e 100644
--- a/unix/ztypes_linux_386.go
+++ b/unix/ztypes_linux_386.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_linux.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_linux_amd64.go b/unix/ztypes_linux_amd64.go
index 694fe1e..f84745a 100644
--- a/unix/ztypes_linux_amd64.go
+++ b/unix/ztypes_linux_amd64.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_linux.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x8
diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go
index 5f21a94..e820995 100644
--- a/unix/ztypes_linux_arm.go
+++ b/unix/ztypes_linux_arm.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_linux.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_netbsd_386.go b/unix/ztypes_netbsd_386.go
index 6add325..345bf23 100644
--- a/unix/ztypes_netbsd_386.go
+++ b/unix/ztypes_netbsd_386.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_netbsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_netbsd_amd64.go b/unix/ztypes_netbsd_amd64.go
index 4451fc1..5559f02 100644
--- a/unix/ztypes_netbsd_amd64.go
+++ b/unix/ztypes_netbsd_amd64.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_netbsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x8
diff --git a/unix/ztypes_netbsd_arm.go b/unix/ztypes_netbsd_arm.go
index 4e853ea..5618909 100644
--- a/unix/ztypes_netbsd_arm.go
+++ b/unix/ztypes_netbsd_arm.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_netbsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_openbsd_386.go b/unix/ztypes_openbsd_386.go
index 2e4d9dd..be07f6e 100644
--- a/unix/ztypes_openbsd_386.go
+++ b/unix/ztypes_openbsd_386.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_openbsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x4
diff --git a/unix/ztypes_openbsd_amd64.go b/unix/ztypes_openbsd_amd64.go
index f07bc71..d553c2f 100644
--- a/unix/ztypes_openbsd_amd64.go
+++ b/unix/ztypes_openbsd_amd64.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_openbsd.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x8
diff --git a/unix/ztypes_solaris_amd64.go b/unix/ztypes_solaris_amd64.go
index 77275a5..9d8d0e5 100644
--- a/unix/ztypes_solaris_amd64.go
+++ b/unix/ztypes_solaris_amd64.go
@@ -1,7 +1,7 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs types_solaris.go
 
-package syscall
+package unix
 
 const (
 	sizeofPtr      = 0x8
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