| ... | ... | @@ -348,7 +348,7 @@ pub fn WIFEXITED(s: i32) bool { |
| 348 | 348 | return WTERMSIG(s) == 0; |
| 349 | 349 | } |
| 350 | 350 | pub fn WIFSTOPPED(s: i32) bool { |
| 351 | | return (u16)(((unsigned(s) & 0xffff) *% 0x10001) >> 8) > 0x7f00; |
| 351 | return @intCast(u16, ((unsigned(s) & 0xffff) *% 0x10001) >> 8) > 0x7f00; |
| 352 | 352 | } |
| 353 | 353 | pub fn WIFSIGNALED(s: i32) bool { |
| 354 | 354 | return (unsigned(s) & 0xffff) -% 1 < 0xff; |
| ... | ... | @@ -368,7 +368,7 @@ pub fn getErrno(r: usize) usize { |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | pub fn dup2(old: i32, new: i32) usize { |
| 371 | | return arch.syscall2(arch.SYS_dup2, usize(old), usize(new)); |
| 371 | return arch.syscall2(arch.SYS_dup2, @intCast(usize, old), @intCast(usize, new)); |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | pub fn chdir(path: [*]const u8) usize { |
| ... | ... | @@ -388,7 +388,7 @@ pub fn getcwd(buf: [*]u8, size: usize) usize { |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | pub fn getdents(fd: i32, dirp: [*]u8, count: usize) usize { |
| 391 | | return arch.syscall3(arch.SYS_getdents, usize(fd), @ptrToInt(dirp), count); |
| 391 | return arch.syscall3(arch.SYS_getdents, @intCast(usize, fd), @ptrToInt(dirp), count); |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | pub fn isatty(fd: i32) bool { |
| ... | ... | @@ -425,7 +425,7 @@ pub fn symlink(existing: [*]const u8, new: [*]const u8) usize { |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: usize) usize { |
| 428 | | return arch.syscall4(arch.SYS_pread, usize(fd), @ptrToInt(buf), count, offset); |
| 428 | return arch.syscall4(arch.SYS_pread, @intCast(usize, fd), @ptrToInt(buf), count, offset); |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | pub fn pipe(fd: *[2]i32) usize { |