hare

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

commit 644f8b56e34aa832194f45a717e7c57eccd51fa0
parent cbeb756c2cd04f78ac2a15d772a1b5b38674be1a
Author: Lennart Jablonka <humm@ljabl.com>
Date:   Thu,  3 Nov 2022 23:22:45 +0000

remove ETIME from errors and rt/+freebsd

ETIME is a Linux thing for "Timer expired."  ETIMEDOUT is a POSIX
thing for "{Connection,Operation} timed out."

In errors::errno, translate ETIMEDOUT to errors::timeout.

Remove rt::ETIME from FreeBSD--it doesn't exist.

Signed-off-by: Lennart Jablonka <humm@ljabl.com>

Diffstat:
Merrors/rt.ha | 2+-
Mrt/+freebsd/errno.ha | 5-----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/errors/rt.ha b/errors/rt.ha @@ -20,7 +20,7 @@ export fn errno(errno: rt::errno) error = { return exists; case rt::ENOENT => return noentry; - case rt::ETIME => + case rt::ETIMEDOUT => return timeout; case rt::EBUSY => return busy; diff --git a/rt/+freebsd/errno.ha b/rt/+freebsd/errno.ha @@ -104,8 +104,6 @@ export fn strerror(err: errno) str = { return "No message of desired type"; case EIDRM => return "Identifier removed"; - case ETIME => - return "Timer expired"; case EREMOTE => return "Object is remote"; case ENOLINK => @@ -306,8 +304,6 @@ export fn errname(err: errno) str = { return "ENOMSG"; case EIDRM => return "EIDRM"; - case ETIME => - return "ETIME"; case EREMOTE => return "EREMOTE"; case ENOLINK => @@ -483,7 +479,6 @@ export def ENOTCONN: int = 57; export def ESHUTDOWN: int = 58; export def ETOOMANYREFS: int = 59; export def ETIMEDOUT: int = 60; -export def ETIME: int = ETIMEDOUT; export def ECONNREFUSED: int = 61; export def ELOOP: int = 62; export def ENAMETOOLONG: int = 63;