From a1406b40c5d2f4b3470cd7e9f16a5cb84cd3c699 Mon Sep 17 00:00:00 2001 From: Anthony Martin Date: Fri, 20 Dec 2013 15:20:51 -0800 Subject: [PATCH] go.tools/ssa/interp: fix Plan 9 build for Brad R=golang-codereviews, rsc, 0intro CC=golang-codereviews https://golang.org/cl/26500043 --- ssa/interp/external.go | 4 ---- ssa/interp/external_plan9.go | 5 +++-- ssa/interp/external_unix.go | 4 ++++ ssa/interp/external_windows.go | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ssa/interp/external.go b/ssa/interp/external.go index 969d61aba5c..8df7cf546f6 100644 --- a/ssa/interp/external.go +++ b/ssa/interp/external.go @@ -333,10 +333,6 @@ func ext۰syscall۰Getpid(fn *ssa.Function, args []value) value { return syscall.Getpid() } -func ext۰syscall۰RawSyscall(fn *ssa.Function, args []value) value { - return tuple{uintptr(0), uintptr(0), uintptr(syscall.ENOSYS)} -} - func valueToBytes(v value) []byte { in := v.([]value) b := make([]byte, len(in)) diff --git a/ssa/interp/external_plan9.go b/ssa/interp/external_plan9.go index 7c02360dac2..6afb643727d 100644 --- a/ssa/interp/external_plan9.go +++ b/ssa/interp/external_plan9.go @@ -5,8 +5,6 @@ package interp import ( - "syscall" - "code.google.com/p/go.tools/ssa" ) @@ -42,3 +40,6 @@ func ext۰syscall۰Write(fn *ssa.Function, args []value) value { n, err := write(args[0].(int), valueToBytes(args[1])) return tuple{n, wrapError(err)} } +func ext۰syscall۰RawSyscall(fn *ssa.Function, args []value) value { + return tuple{^uintptr(0), uintptr(0), uintptr(0)} +} diff --git a/ssa/interp/external_unix.go b/ssa/interp/external_unix.go index fd5e3fb998f..e6dbdd3e997 100644 --- a/ssa/interp/external_unix.go +++ b/ssa/interp/external_unix.go @@ -126,3 +126,7 @@ func ext۰syscall۰Write(fn *ssa.Function, args []value) value { n, err := write(args[0].(int), valueToBytes(args[1])) return tuple{n, wrapError(err)} } + +func ext۰syscall۰RawSyscall(fn *ssa.Function, args []value) value { + return tuple{uintptr(0), uintptr(0), uintptr(syscall.ENOSYS)} +} diff --git a/ssa/interp/external_windows.go b/ssa/interp/external_windows.go index bbd272a5fba..77a0494945c 100644 --- a/ssa/interp/external_windows.go +++ b/ssa/interp/external_windows.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build windows plan9 - package interp import ( @@ -40,3 +38,6 @@ func ext۰syscall۰Stat(fn *ssa.Function, args []value) value { func ext۰syscall۰Write(fn *ssa.Function, args []value) value { panic("syscall.Write not yet implemented") } +func ext۰syscall۰RawSyscall(fn *ssa.Function, args []value) value { + return tuple{uintptr(0), uintptr(0), uintptr(syscall.ENOSYS)} +}