[project] change syscall to /x/sys/unix|windows

Changes most references of syscall to golang.org/x/sys/
Ones aren't changes include, Errno, Signal and SysProcAttr
as they haven't been implemented in /x/sys/.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>

[s390x] switch utsname from unsigned to signed

per 33267e036f
char in s390x in the /x/sys/unix package is now signed, so
change the buildtags

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
This commit is contained in:
Christopher Jones
2017-05-23 10:22:32 -04:00
parent 6978a6e25a
commit 069fdc8a08
93 changed files with 499 additions and 474 deletions

View File

@@ -3,13 +3,13 @@
package platform
import (
"syscall"
"golang.org/x/sys/unix"
)
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
func runtimeArchitecture() (string, error) {
utsname := &syscall.Utsname{}
if err := syscall.Uname(utsname); err != nil {
utsname := &unix.Utsname{}
if err := unix.Uname(utsname); err != nil {
return "", err
}
return charsToString(utsname.Machine), nil

View File

@@ -1,5 +1,5 @@
// +build linux,386 linux,amd64 linux,arm64
// see golang's sources src/syscall/ztypes_linux_*.go that use int8
// +build linux,386 linux,amd64 linux,arm64 s390x
// see golang's sources golang.org/x/sys/unix/ztypes_linux_*.go that use int8
package platform

View File

@@ -1,4 +1,4 @@
// +build linux,386 linux,amd64 linux,arm64
// +build linux,386 linux,amd64 linux,arm64 s390x
package platform

View File

@@ -1,5 +1,5 @@
// +build linux,arm linux,ppc64 linux,ppc64le s390x
// see golang's sources src/syscall/ztypes_linux_*.go that use uint8
// +build linux,arm linux,ppc64 linux,ppc64le
// see golang's sources golang.org/x/sys/unix/ztypes_linux_*.go that use uint8
package platform

View File

@@ -1,4 +1,4 @@
// +build linux,arm linux,ppc64 linux,ppc64le s390x
// +build linux,arm linux,ppc64 linux,ppc64le
package platform