diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-07 22:39:45 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-07 22:39:45 +0000 |
commit | ec9dc45b75deb82a60e9be2711e40e3c14195a4c (patch) | |
tree | 84056f5650192820258fd06c42d69b19481470dd /libgo/syscalls | |
parent | d8b878dc29c0c037c0fb269c5bce1ed2d1547ff9 (diff) | |
download | gcc-ec9dc45b75deb82a60e9be2711e40e3c14195a4c.zip gcc-ec9dc45b75deb82a60e9be2711e40e3c14195a4c.tar.gz gcc-ec9dc45b75deb82a60e9be2711e40e3c14195a4c.tar.bz2 |
Use _nuname on 32-bit Solaris 2/x86.
From-SVN: r170761
Diffstat (limited to 'libgo/syscalls')
-rw-r--r-- | libgo/syscalls/syscall_solaris_386.go | 3 | ||||
-rw-r--r-- | libgo/syscalls/syscall_uname.go | 7 | ||||
-rw-r--r-- | libgo/syscalls/syscall_unix.go | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/libgo/syscalls/syscall_solaris_386.go b/libgo/syscalls/syscall_solaris_386.go index 687722d..7ff8f5b 100644 --- a/libgo/syscalls/syscall_solaris_386.go +++ b/libgo/syscalls/syscall_solaris_386.go @@ -15,3 +15,6 @@ func libc_ptrace(request int, pid Pid_t, addr uintptr, data *byte) int __asm__ ( var dummy *byte const sizeofPtr uintptr = uintptr(unsafe.Sizeof(dummy)) + +// 32-bit Solaris 2/x86 needs to use _nuname internally, cf. <sys/utsname.h>. +func libc_uname(buf *Utsname) (errno int) __asm__("_nuname") diff --git a/libgo/syscalls/syscall_uname.go b/libgo/syscalls/syscall_uname.go new file mode 100644 index 0000000..955866c --- /dev/null +++ b/libgo/syscalls/syscall_uname.go @@ -0,0 +1,7 @@ +// Copyright 2011 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 syscall + +func libc_uname(buf *Utsname) (errno int) __asm__("uname") diff --git a/libgo/syscalls/syscall_unix.go b/libgo/syscalls/syscall_unix.go index 408d0b8..a29b6b5 100644 --- a/libgo/syscalls/syscall_unix.go +++ b/libgo/syscalls/syscall_unix.go @@ -15,8 +15,6 @@ const ENONE = 0 func GetErrno() int func SetErrno(int) -func libc_uname(buf *Utsname) (errno int) __asm__("uname") - func Uname(buf *Utsname) (errno int) { r := libc_uname(buf) if r < 0 { |