aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-01-13 23:35:44 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-01-13 23:35:44 +0000
commit4cce1836bde85844781736f0f87b51ae9393da5f (patch)
treeb5ccbc7f256537894d81c3a45c662c27829e4866 /libgo/go
parentdd1628807a800c86b45495218cb19260bae8a846 (diff)
downloadgcc-4cce1836bde85844781736f0f87b51ae9393da5f.zip
gcc-4cce1836bde85844781736f0f87b51ae9393da5f.tar.gz
gcc-4cce1836bde85844781736f0f87b51ae9393da5f.tar.bz2
libgo: Only build iopl and ioperm on 386, amd64, alpha GNU/Linux.
From-SVN: r183171
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/syscall/libcall_linux.go14
-rw-r--r--libgo/go/syscall/libcall_linux_386.go13
-rw-r--r--libgo/go/syscall/libcall_linux_alpha.go13
-rw-r--r--libgo/go/syscall/libcall_linux_amd64.go13
4 files changed, 43 insertions, 10 deletions
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 79f5d48..3ff5d5f 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -207,12 +207,6 @@ func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0)
// //sysnb Gettid() (tid int)
// //gettid() Pid_t
-//sys Ioperm(from int, num int, on int) (err error)
-//ioperm(from _C_long, num _C_long, on int) int
-
-//sys Iopl(level int) (err error)
-//iopl(level int) int
-
// FIXME: mksysinfo linux_dirent
// Or just abandon this function.
// //sys Getdents(fd int, buf []byte) (n int, err error)
@@ -278,19 +272,19 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
var lroff _loff_t
var plroff *_loff_t
- if (roff != nil) {
+ if roff != nil {
plroff = &lroff
}
var lwoff _loff_t
var plwoff *_loff_t
- if (woff != nil) {
+ if woff != nil {
plwoff = &lwoff
}
n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
- if (roff != nil) {
+ if roff != nil {
*roff = int64(lroff)
}
- if (woff != nil) {
+ if woff != nil {
*woff = int64(lwoff)
}
return
diff --git a/libgo/go/syscall/libcall_linux_386.go b/libgo/go/syscall/libcall_linux_386.go
new file mode 100644
index 0000000..ae7fcd9
--- /dev/null
+++ b/libgo/go/syscall/libcall_linux_386.go
@@ -0,0 +1,13 @@
+// Copyright 2012 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.
+
+// GNU/Linux library calls 386 specific.
+
+package syscall
+
+//sys Ioperm(from int, num int, on int) (err error)
+//ioperm(from _C_long, num _C_long, on int) int
+
+//sys Iopl(level int) (err error)
+//iopl(level int) int
diff --git a/libgo/go/syscall/libcall_linux_alpha.go b/libgo/go/syscall/libcall_linux_alpha.go
new file mode 100644
index 0000000..85e1c59
--- /dev/null
+++ b/libgo/go/syscall/libcall_linux_alpha.go
@@ -0,0 +1,13 @@
+// Copyright 2012 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.
+
+// GNU/Linux library calls Alpha specific.
+
+package syscall
+
+//sys Ioperm(from int, num int, on int) (err error)
+//ioperm(from _C_long, num _C_long, on int) int
+
+//sys Iopl(level int) (err error)
+//iopl(level int) int
diff --git a/libgo/go/syscall/libcall_linux_amd64.go b/libgo/go/syscall/libcall_linux_amd64.go
new file mode 100644
index 0000000..9cab9ba
--- /dev/null
+++ b/libgo/go/syscall/libcall_linux_amd64.go
@@ -0,0 +1,13 @@
+// Copyright 2012 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.
+
+// GNU/Linux library calls amd64 specific.
+
+package syscall
+
+//sys Ioperm(from int, num int, on int) (err error)
+//ioperm(from _C_long, num _C_long, on int) int
+
+//sys Iopl(level int) (err error)
+//iopl(level int) int