mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 16:47:27 -04:00
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
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build race
|
// +build plan9,race
|
||||||
|
|
||||||
package plan9
|
package plan9
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build !race
|
// +build plan9,!race
|
||||||
|
|
||||||
package plan9
|
package plan9
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build plan9
|
||||||
|
|
||||||
package plan9
|
package plan9
|
||||||
|
|
||||||
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build plan9
|
||||||
|
|
||||||
// Package plan9 contains an interface to the low-level operating system
|
// Package plan9 contains an interface to the low-level operating system
|
||||||
// primitives. OS details vary depending on the underlying system, and
|
// primitives. OS details vary depending on the underlying system, and
|
||||||
// by default, godoc will display the OS-specific documentation for the current
|
// by default, godoc will display the OS-specific documentation for the current
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build plan9
|
||||||
|
|
||||||
package plan9_test
|
package plan9_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
+2
-1
@@ -11,7 +11,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"unix"
|
|
||||||
|
"code.google.com/p/go.sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestSCMCredentials tests the sending and receiving of credentials
|
// TestSCMCredentials tests the sending and receiving of credentials
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build darwin dragonfly freebsd linux netbsd openbsd
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ package $package
|
|||||||
import "unsafe"
|
import "unsafe"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
print "import \"unix\"\n" if $package ne "unix";
|
print "import \"code.google.com/p/go.sys/unix\"\n" if $package ne "unix";
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ package unix_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"unix"
|
|
||||||
|
"code.google.com/p/go.sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMmap(t *testing.T) {
|
func TestMmap(t *testing.T) {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build race
|
// +build darwin,race dragonfly,race freebsd,race linux,race netbsd,race openbsd,race
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build !race
|
// +build darwin,!race dragonfly,!race freebsd,!race linux,!race netbsd,!race openbsd,!race
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build darwin dragonfly freebsd linux netbsd openbsd
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build darwin dragonfly freebsd linux netbsd openbsd
|
||||||
|
|
||||||
// Package unix contains an interface to the low-level operating system
|
// Package unix contains an interface to the low-level operating system
|
||||||
// primitives. OS details vary depending on the underlying system, and
|
// primitives. OS details vary depending on the underlying system, and
|
||||||
// by default, godoc will display OS-specific documentation for the current
|
// by default, godoc will display OS-specific documentation for the current
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ package unix_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"unix"
|
|
||||||
|
"code.google.com/p/go.sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
const MNT_WAIT = 1
|
const MNT_WAIT = 1
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build darwin dragonfly freebsd linux netbsd openbsd
|
||||||
|
|
||||||
package unix_test
|
package unix_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"unix"
|
|
||||||
|
"code.google.com/p/go.sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testSetGetenv(t *testing.T, key, value string) {
|
func testSetGetenv(t *testing.T, key, value string) {
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
"unix"
|
|
||||||
|
"code.google.com/p/go.sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Tests that below functions, structures and constants are consistent
|
// Tests that below functions, structures and constants are consistent
|
||||||
|
|||||||
@@ -661,7 +661,7 @@ const srcTemplate = `
|
|||||||
package {{packagename}}
|
package {{packagename}}
|
||||||
|
|
||||||
import "unsafe"{{if windowsdot}}
|
import "unsafe"{{if windowsdot}}
|
||||||
import "windows"{{end}}
|
import "code.google.com/p/go.sys/windows"{{end}}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
{{template "dlls" .}}
|
{{template "dlls" .}}
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build race
|
// +build windows,race
|
||||||
|
|
||||||
package windows
|
package windows
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build !race
|
// +build windows,!race
|
||||||
|
|
||||||
package windows
|
package windows
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build windows
|
||||||
|
|
||||||
package windows
|
package windows
|
||||||
|
|
||||||
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build windows
|
||||||
|
|
||||||
// Package windows contains an interface to the low-level operating system
|
// Package windows contains an interface to the low-level operating system
|
||||||
// primitives. OS details vary depending on the underlying system, and
|
// primitives. OS details vary depending on the underlying system, and
|
||||||
// by default, godoc will display the OS-specific documentation for the current
|
// by default, godoc will display the OS-specific documentation for the current
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build windows
|
||||||
|
|
||||||
package windows_test
|
package windows_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"windows"
|
|
||||||
|
"code.google.com/p/go.sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testSetGetenv(t *testing.T, key, value string) {
|
func testSetGetenv(t *testing.T, key, value string) {
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
"windows"
|
|
||||||
|
"code.google.com/p/go.sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWin32finddata(t *testing.T) {
|
func TestWin32finddata(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user