ref: de24f6900f69432010ba93df62652d687af90155
parent: 1a46ea4e36b58f739a1ca0d492a78f488712334f
author: Andrew Chambers <andrewchamberss@gmail.com>
date: Tue Feb 9 12:29:58 EST 2016
add rename to linux sys
--- a/lib/sys/sys+linux-x64.myr
+++ b/lib/sys/sys+linux-x64.myr
@@ -637,6 +637,7 @@
const open : (path:byte[:], opts:fdopt -> fd)
const openmode : (path:byte[:], opts:fdopt, mode:int64 -> fd)
const close : (fd:fd -> int64)
+ const rename : (from : byte[:], to : byte[:] -> int64)
const creat : (path:byte[:], mode:int64 -> fd)
const unlink : (path:byte[:] -> int)
const read : (fd:fd, buf:byte[:] -> size)
@@ -761,6 +762,7 @@
const openmode = {path, opts, mode; -> syscall(Sysopen, cstring(path), a(opts), a(mode)) castto(fd)}
const close = {fd; -> syscall(Sysclose, a(fd))}
const creat = {path, mode; -> syscall(Syscreat, cstring(path), a(mode)) castto(fd)}
+const rename = {from, to; -> syscall(Sysrename, cstring(from), cstring(to))}
const unlink = {path; -> syscall(Sysunlink, cstring(path)) castto(int)}
const read = {fd, buf; -> syscall(Sysread, a(fd), buf castto(byte#), a(buf.len)) castto(size)}
const write = {fd, buf; -> syscall(Syswrite, a(fd), buf castto(byte#), a(buf.len)) castto(size)}