syscall_socket_epoll_file =
endif
+# Support for uname.
+if LIBGO_IS_SOLARIS
+if LIBGO_IS_386
+# 32-bit Solaris 2/x86 needs _nuname, handled in syscall_solaris_386.go.
+syscall_uname_file =
+else # !LIBGO_IS_386 && LIBGO_IS_SOLARIS
+syscall_uname_file = syscalls/syscall_uname.go
+endif
+else # !LIBGO_IS_SOLARIS
+syscall_uname_file = syscalls/syscall_uname.go
+endif
+
syscall_arch.go: s-syscall_arch; @true
s-syscall_arch: Makefile
rm -f syscall_arch.go.tmp
$(syscall_socket_os_file) \
$(syscall_socket_epoll_file) \
$(syscall_syscall_file) \
+ $(syscall_uname_file) \
syscalls/syscall_unix.go \
syscalls/stringbyte.go \
syscalls/syscall_$(GOOS).go \
# Support for epoll.
@LIBGO_IS_LINUX_TRUE@syscall_socket_epoll_file = syscalls/socket_epoll.go
+@LIBGO_IS_386_FALSE@@LIBGO_IS_SOLARIS_TRUE@syscall_uname_file = syscalls/syscall_uname.go
+
+# Support for uname.
+# 32-bit Solaris 2/x86 needs _nuname, handled in syscall_solaris_386.go.
+@LIBGO_IS_386_TRUE@@LIBGO_IS_SOLARIS_TRUE@syscall_uname_file =
+@LIBGO_IS_SOLARIS_FALSE@syscall_uname_file = syscalls/syscall_uname.go
go_syscall_files = \
$(syscall_errstr_file) \
$(syscall_errstr_decl_file) \
$(syscall_socket_os_file) \
$(syscall_socket_epoll_file) \
$(syscall_syscall_file) \
+ $(syscall_uname_file) \
syscalls/syscall_unix.go \
syscalls/stringbyte.go \
syscalls/syscall_$(GOOS).go \
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")
--- /dev/null
+// 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")
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 {