ref: 0614f810f7ccf086c7ba86db9d9198b5fb240643
parent: 37b4b23c2e9e86a899676afc82f52521a2e30ad8
author: Ori Bernstein <[email protected]>
date: Tue May 27 19:12:10 EDT 2014
Add ioctl for osx.
--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -565,7 +565,7 @@
const stat = {path, sb; -> syscall(Sysstat, cstring(path), sb)}
const fstat = {fd, sb; -> syscall(Sysfstat, fd, sb)}
const mkdir = {path, mode; -> syscall(Sysmkdir, cstring(path), mode) castto(int64)}
-const ioctl = {fd, req, args -> syscall(Sysioctl, fd, req, &args) castto(int64)}
+const ioctl = {fd, req, args; -> syscall(Sysioctl, fd, req, &args) castto(int64)}
/* networking */
const socket = {dom, stype, proto; -> syscall(Syssocket, dom castto(int64), stype, proto) castto(fd)}
--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -508,6 +508,7 @@
const stat : (path:byte[:], sb:statbuf# -> int64)
const fstat : (fd:fd, sb:statbuf# -> int64)
const mkdir : (path : byte[:], mode : int64 -> int64)
+ const ioctl : (fd:fd, req : int64, args:... -> int64)
/* networking */
const socket : (dom : sockfam, stype : socktype, proto : sockproto -> fd)
@@ -599,6 +600,7 @@
const stat = {path, sb; -> syscall(Sysstat, cstring(path), sb)}
const fstat = {fd, sb; -> syscall(Sysfstat, fd, sb)}
const mkdir = {path, mode; -> syscall(Sysmkdir, cstring(path), mode) castto(int64)}
+const ioctl = {fd, req, args; -> syscall(Sysioctl, fd, req, &args) castto(int64)}
/* networking */
const socket = {dom, stype, proto; -> syscall(Syssocket, dom castto(int64), stype, proto) castto(fd) }