ref: 58f01f8ad2e372ddc4a85bac6e6dba1c4469673a
parent: bd548d893500b61c555a9d75bb1be533caba23fc
author: Ori Bernstein <[email protected]>
date: Sun Dec 28 18:46:56 EST 2014
Actually add the seek code.
--- a/libstd/syswrap+posixy.myr
+++ b/libstd/syswrap+posixy.myr
@@ -5,12 +5,13 @@
type fd = sys.fd
type pid = sys.pid
type fdopt = sys.fdopt
+ type whence = sys.whence
const Failmem : byte# = -1 castto(byte#)
- const Seekset : seektype = 0
- const Seekcur : seektype = 1
- const Seekend : seektype = 2
+ const Seekset : whence = 0
+ const Seekcur : whence = 1
+ const Seekend : whence = 2
const Ordonly : fdopt = sys.Ordonly castto(fdopt)
const Owronly : fdopt = sys.Owronly castto(fdopt)
@@ -28,6 +29,7 @@
const read : (fd : fd, buf : byte[:] -> size)
const write : (fd : fd, buf : byte[:] -> size)
const pipe : (fds : fd[2]# -> int64)
+ const seek : (fd : fd, delta : off, whence : whence -> off)
const dup2 : (ofd : fd, nfd : fd -> fd)
/* path manipulation */