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/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