ref: fcd25570857bc4e00da359179ac57b785826f534
parent: b91f9a20e3c35f4328c77130fc30537f23e794d3
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 4 08:58:40 EST 2015
Fix compile issue: type mismatch.
--- a/libstd/syswrap+plan9.myr
+++ b/libstd/syswrap+plan9.myr
@@ -116,7 +116,7 @@
if sys.stat(path, buf[:]) < Stringsoff
-> `None
;;
- -> `Some getle64(buf[Lengthoff:Lengthoff + 8])
+ -> `Some (getle32(buf[Mtimeoff:Mtimeoff + 8]) castto(time))
}
const fsize = {path
@@ -125,7 +125,7 @@
if sys.stat(path, buf[:]) < Stringsoff
-> `None
;;
- -> `Some getle64(buf[Lengthoff:Lengthoff + 8])
+ -> `Some (getle64(buf[Lengthoff:Lengthoff + 8]) castto(off))
}
const getsysinfo = {si
@@ -217,9 +217,11 @@
-> errbuf[:i]
}
+/* FIXME: will be needed when we resize stat bufs when statting.
const statsz = {buf
-> (buf[0] castto(int64)) | ((buf[1] << 8) castto(int64))
}
+*/
const getle32 = {buf
-> (buf[0] castto(int32)) \