shithub: mc

Download patch

ref: 21735ecc21f9086c786978dbcd9189bd7fbdba3b
parent: c8794878730e4602be2b0de154e8aa8a4d26a491
author: Ori Bernstein <[email protected]>
date: Thu Aug 2 14:33:13 EDT 2012

Fix operand size issues in syscalls.

    Er. I really should do something WRT 'foo.len' calls.

--- a/sys-linux.myr
+++ b/sys-linux.myr
@@ -391,7 +391,7 @@
 const close	= {fd;			-> syscall(Sysclose, fd);}
 const creat	= {path, mode;		-> syscall(Syscreat, path castto(char*), mode);}
 const read	= {fd, buf;		-> syscall(Sysread, fd, buf castto(char*), buf.len);}
-const write	= {fd, buf;		-> syscall(Syswrite, fd, buf castto(char*), buf.len);}
+const write	= {fd, buf;		-> syscall(Syswrite, fd, buf castto(char*), buf.len castto(size));}
 const lseek	= {fd, off, whence;	-> syscall(Syslseek, fd, off, whence);}
 const fstat	= {fd, sb;		-> syscall(Sysfstat, fd, sb);}
 const munmap	= {addr, len;		-> syscall(Sysmunmap, addr, len);}