diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-19 14:00:59 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-19 14:00:59 +0000 |
commit | 9195aa172bbc20627f23bfb1612180c83a0a7bab (patch) | |
tree | e42ecb2ffbddc6bf438c711494028bc3b86f527c /libgo/go/os | |
parent | 3b595ecaeda647070c6c4ede0c09be78dfc4f763 (diff) | |
download | gcc-9195aa172bbc20627f23bfb1612180c83a0a7bab.zip gcc-9195aa172bbc20627f23bfb1612180c83a0a7bab.tar.gz gcc-9195aa172bbc20627f23bfb1612180c83a0a7bab.tar.bz2 |
libgo: fix build on AIX
Since aix/ppc64 has been added to GC toolchain, a mix between new and
old files were created in gcc toolchain.
This commit corrects this merge for aix/ppc64 and aix/ppc.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167658
From-SVN: r269797
Diffstat (limited to 'libgo/go/os')
-rw-r--r-- | libgo/go/os/dir_gccgo.go | 3 | ||||
-rw-r--r-- | libgo/go/os/dir_libc64_gccgo.go | 3 | ||||
-rw-r--r-- | libgo/go/os/dir_libc_gccgo.go | 3 | ||||
-rw-r--r-- | libgo/go/os/sys_aix.go | 26 |
4 files changed, 6 insertions, 29 deletions
diff --git a/libgo/go/os/dir_gccgo.go b/libgo/go/os/dir_gccgo.go index 60f70aa..ad77a40 100644 --- a/libgo/go/os/dir_gccgo.go +++ b/libgo/go/os/dir_gccgo.go @@ -16,9 +16,6 @@ import ( //extern pathconf func libc_pathconf(*byte, int) int -//extern fdopendir -func libc_fdopendir(int32) *syscall.DIR - func clen(n []byte) int { for i := 0; i < len(n); i++ { if n[i] == 0 { diff --git a/libgo/go/os/dir_libc64_gccgo.go b/libgo/go/os/dir_libc64_gccgo.go index dc3ba7f..3582243 100644 --- a/libgo/go/os/dir_libc64_gccgo.go +++ b/libgo/go/os/dir_libc64_gccgo.go @@ -10,3 +10,6 @@ import "syscall" //extern closedir64 func libc_closedir(*syscall.DIR) int + +//extern fdopendir64 +func libc_fdopendir(int32) *syscall.DIR diff --git a/libgo/go/os/dir_libc_gccgo.go b/libgo/go/os/dir_libc_gccgo.go index b46eb4c..a3be43b 100644 --- a/libgo/go/os/dir_libc_gccgo.go +++ b/libgo/go/os/dir_libc_gccgo.go @@ -10,3 +10,6 @@ import "syscall" //extern closedir func libc_closedir(*syscall.DIR) int + +//extern fdopendir +func libc_fdopendir(int32) *syscall.DIR diff --git a/libgo/go/os/sys_aix.go b/libgo/go/os/sys_aix.go deleted file mode 100644 index 53a40f2..0000000 --- a/libgo/go/os/sys_aix.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package os - -import "syscall" - -// gethostname syscall cannot be used because it also returns the domain. -// Therefore, hostname is retrieve with uname syscall and the Nodename field. - -func hostname() (name string, err error) { - var u syscall.Utsname - if errno := syscall.Uname(&u); errno != nil { - return "", NewSyscallError("uname", errno) - } - b := make([]byte, len(u.Nodename)) - i := 0 - for ; i < len(u.Nodename); i++ { - if u.Nodename[i] == 0 { - break - } - b[i] = byte(u.Nodename[i]) - } - return string(b[:i]), nil -} |