unix: add ioctl functions on Darwin
Add IoctlGetInt/IoctlSetInt, IoctlGetTermios/IoctlSetTermios and
IoctlGetWinsize/IoctlSetWinsize on Darwin. These are similar to the
already existing implementations on Linux and Solaris.
Generated on Mac OS 10.11 (Darwin 15.6.0).
Change-Id: I2d4cc957c840836fcc2ccb71c67631420f4a2eb1
Reviewed-on: https://go-review.googlesource.com/52410
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/unix/zsyscall_darwin_386.go b/unix/zsyscall_darwin_386.go
index 2198f0b..92708ac 100644
--- a/unix/zsyscall_darwin_386.go
+++ b/unix/zsyscall_darwin_386.go
@@ -298,6 +298,16 @@
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)