libgo/syscalls: Finish Solaris code.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 14 Jan 2011 19:10:02 +0000 (19:10 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 14 Jan 2011 19:10:02 +0000 (19:10 +0000)
Mostly from Rainer Orth.

From-SVN: r168814

libgo/syscalls/syscall_solaris_amd64.go
libgo/syscalls/syscall_solaris_sparc.go
libgo/syscalls/syscall_solaris_sparc64.go

index f68b596c38b706bf156d0602c9e92603866969d6..15d22561507ae94f0da1ffe2d598c351476f2787 100644 (file)
@@ -13,7 +13,7 @@ import "unsafe"
 
 // 64-bit ptrace(3C) doesn't exist
 func libc_ptrace(request int, pid Pid_t, addr uintptr, data *byte) int {
-       errno := ENOSYS
+       SetErrno(ENOSYS)
        return -1
 }
 
index 91758d509d0b29b82ddcac15f3e91a9384ee8872..0be60b92967c889a15d9dd19086ce47d2d569160 100644 (file)
@@ -1,7 +1,17 @@
-// syscall_solaris_sparc.go -- Solaris SPARC specific support
+// syscall_solaris_sparc.go -- Solaris/SPARC specific support
 
 // 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
+
+import "unsafe"
+
+// FIXME: ptrace(3C) has this, but exec.go expects the next.
+//func libc_ptrace(request int, pid Pid_t, addr int, data int) int __asm__ ("ptrace")
+
+func libc_ptrace(request int, pid Pid_t, addr uintptr, data *byte) int __asm__ ("ptrace")
+
+var dummy *byte
+const sizeofPtr uintptr = uintptr(unsafe.Sizeof(dummy))
index f371dd21a4c3d23570749c005ff03c4a3c201cd9..81e2010cd132508962fd6bf085bb8a4752c13c49 100644 (file)
@@ -1,7 +1,21 @@
-// syscall_solaris_v9.go -- Solaris sparc9v specific support
+// syscall_solaris_sparc64.go -- Solaris/SPARCV9 specific support
 
 // 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
+
+import "unsafe"
+
+// FIXME: ptrace(3C) has this, but exec.go expects the next.
+//func libc_ptrace(request int, pid Pid_t, addr int, data int) int __asm__ ("ptrace")
+
+// 64-bit ptrace(3C) doesn't exist
+func libc_ptrace(request int, pid Pid_t, addr uintptr, data *byte) int {
+       SetErrno(ENOSYS)
+       return -1
+}
+
+var dummy *byte
+const sizeofPtr uintptr = uintptr(unsafe.Sizeof(dummy))