shithub: mc

Download patch

ref: 6b7c47b0981a01b8b18b651d6cbc62c5074a97cf
parent: 918dc52272baa853d5e9a49f224e89cd55c8fd64
parent: 82401e411e1062f5b3b3df2b43789e3292b99868
author: Ori Bernstein <[email protected]>
date: Tue Jun 24 19:55:20 EDT 2014

Merge branch 'master' of git+ssh://mimir.eigenstate.org/git/ori/mc

--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -526,10 +526,11 @@
 	const openmode	: (path:byte[:], opts:fdopt, mode:int64 -> fd)
 	const close	: (fd:fd -> int64)
 	const creat	: (path:byte[:], mode:int64 -> fd)
-	const read	: (fd:fd, buf:byte[:] -> size)
-	const write	: (fd:fd, buf:byte[:] -> size)
+	const read	: (fd:fd, buf:byte[:] -> int64)
+	const write	: (fd:fd, buf:byte[:] -> int64)
 	const lseek	: (fd:fd, off:uint64, whence:int64 -> int64)
 	const stat	: (path:byte[:], sb:statbuf# -> int64)
+	const lstat	: (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)
@@ -620,11 +621,12 @@
 const openmode	= {path, opts, mode;	-> syscall(Sysopen, cstring(path), opts, mode) castto(fd)}
 const close	= {fd;			-> syscall(Sysclose, fd)}
 const creat	= {path, mode;		-> openmode(path, Ocreat | Otrunc | Owronly, mode) castto(fd)}
-const read	= {fd, buf;		-> syscall(Sysread, fd, buf castto(byte#), buf.len castto(size)) castto(size)}
-const write	= {fd, buf;		-> syscall(Syswrite, fd, buf castto(byte#), buf.len castto(size)) castto(size)}
+const read	= {fd, buf;		-> syscall(Sysread, fd, buf castto(byte#), buf.len castto(size))}
+const write	= {fd, buf;		-> syscall(Syswrite, fd, buf castto(byte#), buf.len castto(size))}
 const lseek	= {fd, off, whence;	-> syscall(Syslseek, fd, off, whence)}
 const stat	= {path, sb;		-> syscall(Sysstat64, cstring(path), sb)}
-const fstat	= {fd, sb;		-> syscall(Sysfstat, fd, sb)}
+const lstat	= {path, sb;		-> syscall(Syslstat64, cstring(path), sb)}
+const fstat	= {fd, sb;		-> syscall(Sysfstat64, fd, sb)}
 const mkdir	= {path, mode;		-> syscall(Sysmkdir, cstring(path), mode) castto(int64)}
 const ioctl	= {fd, req, args
 	var arg : byte#