aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-10-25 18:06:32 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-10-25 18:06:32 +0000
commit04cc7d7c136f99982541145e155c8281dc57dc1b (patch)
tree1332bfef8a166ad506aba500e3aad8d13a8c32bd
parentf9367b7c7010b02d6a6dca7278b01ea3fab17d91 (diff)
downloadgcc-04cc7d7c136f99982541145e155c8281dc57dc1b.zip
gcc-04cc7d7c136f99982541145e155c8281dc57dc1b.tar.gz
gcc-04cc7d7c136f99982541145e155c8281dc57dc1b.tar.bz2
Solaris/Irix compatibility patches.
From-SVN: r180440
-rw-r--r--libgo/go/syscall/exec_stubs.go4
-rw-r--r--libgo/go/syscall/exec_unix.go3
-rw-r--r--libgo/go/syscall/libcall_irix.go8
-rw-r--r--libgo/go/syscall/libcall_linux.go6
-rw-r--r--libgo/go/syscall/libcall_posix.go3
-rw-r--r--libgo/go/syscall/libcall_solaris_386.go3
-rw-r--r--libgo/go/syscall/libcall_solaris_amd64.go10
-rw-r--r--libgo/go/syscall/libcall_solaris_sparc.go8
-rw-r--r--libgo/go/syscall/libcall_solaris_sparc64.go10
9 files changed, 49 insertions, 6 deletions
diff --git a/libgo/go/syscall/exec_stubs.go b/libgo/go/syscall/exec_stubs.go
index ce5dabe..02b9ec3 100644
--- a/libgo/go/syscall/exec_stubs.go
+++ b/libgo/go/syscall/exec_stubs.go
@@ -17,3 +17,7 @@ func Exec(argv0 string, argv []string, envv []string) (err int) {
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, errno int) {
return -1, ENOSYS;
}
+
+func raw_ptrace(request int, pid int, addr *byte, data *byte) int {
+ return ENOSYS
+}
diff --git a/libgo/go/syscall/exec_unix.go b/libgo/go/syscall/exec_unix.go
index 765f4d1..96dfa4d 100644
--- a/libgo/go/syscall/exec_unix.go
+++ b/libgo/go/syscall/exec_unix.go
@@ -16,9 +16,6 @@ import (
//sysnb raw_fork() (pid Pid_t, errno int)
//fork() Pid_t
-//sysnb raw_ptrace(request int, pid int, addr *byte, data *byte) (errno int)
-//ptrace(request int, pid Pid_t, addr *byte, data *byte) _C_long
-
//sysnb raw_setsid() (errno int)
//setsid() Pid_t
diff --git a/libgo/go/syscall/libcall_irix.go b/libgo/go/syscall/libcall_irix.go
new file mode 100644
index 0000000..ae45355
--- /dev/null
+++ b/libgo/go/syscall/libcall_irix.go
@@ -0,0 +1,8 @@
+// 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
+
+//sysnb raw_ptrace(request int, pid int, addr *byte, data *byte) (errno int)
+//ptrace(request int, pid Pid_t, addr *byte, data *byte) _C_long
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index a469873..58422e1 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -29,6 +29,9 @@ func Futimes(fd int, tv []Timeval) (errno int) {
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (errno int)
//ptrace(request int, pid Pid_t, addr *byte, data *byte) _C_long
+//sysnb raw_ptrace(request int, pid int, addr *byte, data *byte) (errno int)
+//ptrace(request int, pid Pid_t, addr *byte, data *byte) _C_long
+
func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, errno int) {
// The peek requests are machine-size oriented, so we wrap it
// to retrieve arbitrary-length data.
@@ -192,6 +195,9 @@ func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int)
//fchownat(dirfd int, path *byte, owner Uid_t, group Gid_t, flags int) int
+//sys Flock(fd int, how int) (errno int)
+//flock(fd int, how int) int
+
// FIXME: mksysinfo statfs
// //sys Fstatfs(fd int, buf *Statfs_t) (errno int)
// //fstatfs(fd int, buf *Statfs_t) int
diff --git a/libgo/go/syscall/libcall_posix.go b/libgo/go/syscall/libcall_posix.go
index b83c2b5..0baec62 100644
--- a/libgo/go/syscall/libcall_posix.go
+++ b/libgo/go/syscall/libcall_posix.go
@@ -199,9 +199,6 @@ func FDZero(set *FdSet) {
//sys Fdatasync(fd int) (errno int)
//fdatasync(fd int) int
-//sys Flock(fd int, how int) (errno int)
-//flock(fd int, how int) int
-
//sys Fsync(fd int) (errno int)
//fsync(fd int) int
diff --git a/libgo/go/syscall/libcall_solaris_386.go b/libgo/go/syscall/libcall_solaris_386.go
index a008a22..9c4e966 100644
--- a/libgo/go/syscall/libcall_solaris_386.go
+++ b/libgo/go/syscall/libcall_solaris_386.go
@@ -7,3 +7,6 @@ package syscall
// 32-bit Solaris 2/x86 needs to use _nuname internally, cf. <sys/utsname.h>.
//sysnb Uname(buf *Utsname) (errno int)
//_nuname(buf *Utsname) int
+
+//sysnb raw_ptrace(request int, pid int, addr *byte, data *byte) (errno int)
+//ptrace(request int, pid Pid_t, addr *byte, data *byte) _C_long
diff --git a/libgo/go/syscall/libcall_solaris_amd64.go b/libgo/go/syscall/libcall_solaris_amd64.go
new file mode 100644
index 0000000..f0d335d
--- /dev/null
+++ b/libgo/go/syscall/libcall_solaris_amd64.go
@@ -0,0 +1,10 @@
+// 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
+
+// 64-bit ptrace(3C) doesn't exist
+func raw_ptrace(request int, pid int, addr *byte, data *byte) int {
+ return ENOSYS
+}
diff --git a/libgo/go/syscall/libcall_solaris_sparc.go b/libgo/go/syscall/libcall_solaris_sparc.go
new file mode 100644
index 0000000..ae45355
--- /dev/null
+++ b/libgo/go/syscall/libcall_solaris_sparc.go
@@ -0,0 +1,8 @@
+// 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
+
+//sysnb raw_ptrace(request int, pid int, addr *byte, data *byte) (errno int)
+//ptrace(request int, pid Pid_t, addr *byte, data *byte) _C_long
diff --git a/libgo/go/syscall/libcall_solaris_sparc64.go b/libgo/go/syscall/libcall_solaris_sparc64.go
new file mode 100644
index 0000000..f0d335d
--- /dev/null
+++ b/libgo/go/syscall/libcall_solaris_sparc64.go
@@ -0,0 +1,10 @@
+// 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
+
+// 64-bit ptrace(3C) doesn't exist
+func raw_ptrace(request int, pid int, addr *byte, data *byte) int {
+ return ENOSYS
+}