shithub: mc

Download patch

ref: b1cd018c05d289e45529d5e15b928a1cae177223
parent: 26ef45c1f3e27bd57fcae049cd55aabf2738f1e8
author: glenda@drat <glenda@drat>
date: Thu May 26 02:37:47 EDT 2016

Some 9front build fixes.

--- a/lib/date/bld.sub
+++ b/lib/date/bld.sub
@@ -5,6 +5,7 @@
 	parse.myr
 	types.myr
 	zoneinfo+posixy.myr
+	zoneinfo+plan9.myr
 
         lib ../sys:sys
         lib ../std:std
--- /dev/null
+++ b/lib/date/zoneinfo+plan9.myr
@@ -1,0 +1,25 @@
+use std
+use sys
+
+use "types"
+
+pkg _zoneinfo =
+	type zifile
+	const findtzoff : (tz : byte[:], tm : std.time -> std.option(date.duration))
+	const load	: (file : byte[:] -> zifile#)
+	const free	: (f : zifile# -> void)
+;;
+
+type zifile = byte
+
+const findtzoff	= {tz, tm
+	-> `std.Some 0
+}
+
+const load = {f
+	-> std.alloc()
+}
+
+const free = {p
+	-> std.free(p)
+}
--- a/lib/std/syswrap+plan9.myr
+++ b/lib/std/syswrap+plan9.myr
@@ -122,7 +122,7 @@
 	if sys.stat(path, buf[:]) < Stringsoff
 		-> `Fail Emisc
 	;;
-	-> `Ok (getle32(buf[Mtimeoff:Mtimeoff + 8] : ime))
+	-> `Ok (getle32(buf[Mtimeoff:Mtimeoff + 8]) : time)
 }
 
 const fsize = {path
@@ -131,7 +131,7 @@
 	if sys.stat(path, buf[:]) < Stringsoff
 		-> `Fail Emisc
 	;;
-	-> `Ok (getle64(buf[Lengthoff:Lengthoff + 8] : off))
+	-> `Ok (getle64(buf[Lengthoff:Lengthoff + 8]) : off)
 }
 
 extern const put : (fmt : byte[:], args : ... -> int64)
@@ -173,7 +173,7 @@
 const close	= {fd;		-> (sys.close((fd : sys.fd)) : errno)}
 const read	= {fd, buf;	-> check(sys.pread((fd : sys.fd), buf, -1))}
 const write	= {fd, buf;	-> check(sys.pwrite((fd : sys.fd), buf, -1))}
-const seek	= {fd, off, whence; 	-> check(sys.seek((fd : sys.fd), (off : sys.off), (whence : nt64)))}
+const seek	= {fd, off, whence; 	-> check(sys.seek((fd : sys.fd), (off : sys.off), (whence : int64)))}
 const pipe	= {fds;		-> (sys.pipe((fds : sys.fd[2]#)) : errno)}
 const dup2	= {ofd, nfd;	-> check(sys.dup((ofd : sys.fd), (nfd : sys.fd)))}
 
@@ -206,7 +206,7 @@
 }
 
 const nanosleep = {nsecs
-	if (sys.sleep((nsecs/1_000_000) : int32)) < 0
+	if sys.sleep((nsecs/1_000_000 : uint32)) < 0
 		-> lasterr()
 	;;
 	-> 0