shithub: mc

Download patch

ref: 447e1f5a61eda13456c3fc9c562cd70012ab16d7
parent: 061e88f56523001e1534ce6bbed09aa976c5f85c
author: Ori Bernstein <[email protected]>
date: Mon Aug 18 15:48:16 EDT 2014

More missing fd -> uint64 casts.

--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -594,8 +594,8 @@
 const openmode	= {path, opts, mode;	-> syscall(Sysopen, cstring(path), opts, mode) castto(fd)}
 const close	= {fd;			-> syscall(Sysclose, fd castto(uint64))}
 const creat	= {path, mode;		-> syscall(Syscreat, cstring(path), mode) castto(fd)}
-const read	= {fd, buf;		-> syscall(Sysread, fd castto(uint64), buf castto(byte#), buf.len castto(size)) castto(size)}
-const write	= {fd, buf;		-> syscall(Syswrite, fd castto(uint64), buf castto(byte#), buf.len castto(size)) castto(size)}
+const read	= {fd, buf;		-> syscall(Sysread, fd castto(uint64), buf castto(byte#), buf.len castto(uint64)) castto(size)}
+const write	= {fd, buf;		-> syscall(Syswrite, fd castto(uint64), buf castto(byte#), buf.len castto(uint64)) castto(size)}
 const lseek	= {fd, off, whence;	-> syscall(Syslseek, fd castto(uint64), off, whence)}
 const stat	= {path, sb;		-> syscall(Sysstat, cstring(path), sb)}
 const fstat	= {fd, sb;		-> syscall(Sysfstat, fd castto(uint64), sb)}