unix: convert Darwin syscalls from raw to libSystem

Call into libSystem (Darwin's libc equivalent) to do system calls.
Raw syscalls are not a supported ABI on Darwin, they want us to use
libSystem calls instead.

The stdlib has already been converted to this new regime.  This
package is vendored into the stdlib, so we need to fix it also, then
vendor it in again.

Because this package isn't tied to a Go release, we need to keep the
old code around and use the new code only for 1.12 and up.

Update golang/go#17490

Change-Id: Idbcacff096b5bfeac871aa75dfd971570ac93322
Reviewed-on: https://go-review.googlesource.com/c/154179
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Keith Randall
2018-12-20 18:13:18 +00:00
committed by Keith Randall
parent 97b4c2a929
commit 45d26eb94b
18 changed files with 10701 additions and 8 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
// go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// go run mksyscall.go -tags darwin,arm64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build darwin,arm64
// +build darwin,arm64,!go1.12
package unix