go.sys/unix: use syscall.Errno for errors
If we use a local type, it won't compare properly with errors from
the rest of the standard library. Errors are the one type from syscall
that propagates through the system, so it's important to have only
one type for them.
Ditto for syscall.Signal.
LGTM=dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/123490043
diff --git a/unix/syscall_freebsd_386.go b/unix/syscall_freebsd_386.go
index eee983b..b3b02d4 100644
--- a/unix/syscall_freebsd_386.go
+++ b/unix/syscall_freebsd_386.go
@@ -4,7 +4,10 @@
package unix
-import "unsafe"
+import (
+ "syscall"
+ "unsafe"
+)
func Getpagesize() int { return 4096 }
@@ -55,4 +58,4 @@
return
}
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
+func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)