From 279b3782ad89e6d4863ede52503cebf48141698f Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 12 Aug 2014 22:59:00 -0700 Subject: [PATCH] go.sys: fix imports to cgc/p/go.sys, add build tags Approach but probably not achieve a green build. LGTM=adg R=golang-codereviews, adg CC=golang-codereviews https://golang.org/cl/126120043 --- plan9/race.go | 2 +- plan9/race0.go | 2 +- plan9/str.go | 2 ++ plan9/syscall.go | 2 ++ plan9/syscall_test.go | 2 ++ unix/creds_test.go | 3 ++- unix/flock.go | 2 ++ unix/mksyscall_solaris.pl | 2 +- unix/mmap_unix_test.go | 3 ++- unix/race.go | 2 +- unix/race0.go | 2 +- unix/str.go | 2 ++ unix/syscall.go | 2 ++ unix/syscall_bsd_test.go | 3 ++- unix/syscall_test.go | 5 ++++- unix/syscall_unix_test.go | 3 ++- windows/mksyscall_windows.go | 2 +- windows/race.go | 2 +- windows/race0.go | 2 +- windows/str.go | 2 ++ windows/syscall.go | 2 ++ windows/syscall_test.go | 5 ++++- windows/syscall_windows_test.go | 3 ++- 23 files changed, 42 insertions(+), 15 deletions(-) diff --git a/plan9/race.go b/plan9/race.go index c7344aa9..c7ff5df2 100644 --- a/plan9/race.go +++ b/plan9/race.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. -// +build race +// +build plan9,race package plan9 diff --git a/plan9/race0.go b/plan9/race0.go index 49cfb806..06cabcc7 100644 --- a/plan9/race0.go +++ b/plan9/race0.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. -// +build !race +// +build plan9,!race package plan9 diff --git a/plan9/str.go b/plan9/str.go index 93a1777f..4f7f9ad7 100644 --- a/plan9/str.go +++ b/plan9/str.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build plan9 + package plan9 func itoa(val int) string { // do it here rather than with fmt to avoid dependency diff --git a/plan9/syscall.go b/plan9/syscall.go index 22a65885..18a63077 100644 --- a/plan9/syscall.go +++ b/plan9/syscall.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build plan9 + // 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 diff --git a/plan9/syscall_test.go b/plan9/syscall_test.go index 1e7acb97..9b8c7dae 100644 --- a/plan9/syscall_test.go +++ b/plan9/syscall_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build plan9 + package plan9_test import ( diff --git a/unix/creds_test.go b/unix/creds_test.go index 90e30807..78b3dbd4 100644 --- a/unix/creds_test.go +++ b/unix/creds_test.go @@ -11,7 +11,8 @@ import ( "net" "os" "testing" - "unix" + + "code.google.com/p/go.sys/unix" ) // TestSCMCredentials tests the sending and receiving of credentials diff --git a/unix/flock.go b/unix/flock.go index 5ba9c7dd..ce67a595 100644 --- a/unix/flock.go +++ b/unix/flock.go @@ -4,6 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin dragonfly freebsd linux netbsd openbsd + package unix import "unsafe" diff --git a/unix/mksyscall_solaris.pl b/unix/mksyscall_solaris.pl index f05c3de4..1f9f30ec 100755 --- a/unix/mksyscall_solaris.pl +++ b/unix/mksyscall_solaris.pl @@ -264,7 +264,7 @@ package $package import "unsafe" EOF -print "import \"unix\"\n" if $package ne "unix"; +print "import \"code.google.com/p/go.sys/unix\"\n" if $package ne "unix"; print <