hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 175b777bf604c1695438f31ee3b5d910ab65b96a
parent 3779c9fac818f0483217c2bf8114efa77a2e09eb
Author: Sebastian <sebastian@sebsite.pw>
Date:   Mon, 10 Oct 2022 17:26:43 -0400

rt: fix lseek parameter type

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mio/+freebsd/file.ha | 2+-
Mio/+linux/file.ha | 2+-
Mrt/+freebsd/syscalls.ha | 2+-
Mrt/+linux/syscalls.ha | 2+-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/io/+freebsd/file.ha b/io/+freebsd/file.ha @@ -54,7 +54,7 @@ fn fd_seek( offs: off, whence: whence, ) (off | error) = { - match (rt::lseek(fd, offs: i64, whence: uint)) { + match (rt::lseek(fd, offs: i64, whence: int)) { case let err: rt::errno => return errors::errno(err); case let n: i64 => diff --git a/io/+linux/file.ha b/io/+linux/file.ha @@ -55,7 +55,7 @@ fn fd_seek( offs: off, whence: whence, ) (off | error) = { - match (rt::lseek(fd, offs: i64, whence: uint)) { + match (rt::lseek(fd, offs: i64, whence: int)) { case let err: rt::errno => return errors::errno(err); case let n: i64 => diff --git a/rt/+freebsd/syscalls.ha b/rt/+freebsd/syscalls.ha @@ -67,7 +67,7 @@ export fn close(fd: int) (void | errno) = { wrap_return(syscall1(SYS_close, fd: u64))?; }; -export fn lseek(fd: int, off: i64, whence: uint) (i64 | errno) = { +export fn lseek(fd: int, off: i64, whence: int) (i64 | errno) = { return wrap_return(syscall3(SYS_lseek, fd: u64, off: u64, whence: u64))?: i64; }; diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -321,7 +321,7 @@ export fn mprotect(addr: *void, length: size, prot: uint) (void | errno) = { addr: uintptr: u64, length: u64, prot: u64))?; }; -export fn lseek(fd: int, off: i64, whence: uint) (i64 | errno) = { +export fn lseek(fd: int, off: i64, whence: int) (i64 | errno) = { return wrap_return(syscall3(SYS_lseek, fd: u64, off: u64, whence: u64))?: i64; };