From a5c67414d8c7d1523e1cfef40a615d3ff3bf9c9e Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 26 Jun 2005 21:48:05 +0000 Subject: [PATCH] fix errno numbers across platforms, some UI work --- library/unix/io.factor | 3 --- library/unix/syscalls-freebsd.factor | 4 ++++ library/unix/syscalls-linux.factor | 4 ++++ library/unix/syscalls-macosx.factor | 4 ++++ library/unix/syscalls.factor | 2 -- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/library/unix/io.factor b/library/unix/io.factor index 5ba5735f65..92ac6f6d25 100644 --- a/library/unix/io.factor +++ b/library/unix/io.factor @@ -76,9 +76,6 @@ M: port set-timeout ( timeout port -- ) : pending-error ( port -- ) dup port-error f rot set-port-error throw ; -: EAGAIN 11 ; -: EINTR 4 ; - : defer-error ( port -- ? ) #! Return t if it is an unrecoverable error. err_no dup EAGAIN = over EINTR = or [ diff --git a/library/unix/syscalls-freebsd.factor b/library/unix/syscalls-freebsd.factor index 25af8664c3..fa9e3a7be0 100644 --- a/library/unix/syscalls-freebsd.factor +++ b/library/unix/syscalls-freebsd.factor @@ -31,3 +31,7 @@ BEGIN-STRUCT: sockaddr-in FIELD: in_addr_t addr FIELD: longlong unused END-STRUCT + +: EINTR HEX: 4 ; +: EAGAIN HEX: 23 ; +: EINPROGRESS HEX: 24 ; diff --git a/library/unix/syscalls-linux.factor b/library/unix/syscalls-linux.factor index 9d449707e2..d10fcaeefc 100644 --- a/library/unix/syscalls-linux.factor +++ b/library/unix/syscalls-linux.factor @@ -31,3 +31,7 @@ BEGIN-STRUCT: sockaddr-in FIELD: in_addr_t addr FIELD: longlong unused END-STRUCT + +: EINTR HEX: 4 ; +: EAGAIN HEX: b ; +: EINPROGRESS HEX: 73 ; diff --git a/library/unix/syscalls-macosx.factor b/library/unix/syscalls-macosx.factor index bfa5c55758..93b28adbe3 100644 --- a/library/unix/syscalls-macosx.factor +++ b/library/unix/syscalls-macosx.factor @@ -31,3 +31,7 @@ BEGIN-STRUCT: sockaddr-in FIELD: in_addr_t addr FIELD: longlong unused END-STRUCT + +: EINTR HEX: 4 ; +: EAGAIN HEX: 23 ; +: EINPROGRESS HEX: 24 ; diff --git a/library/unix/syscalls.factor b/library/unix/syscalls.factor index c1d3c84dd0..a423357fec 100644 --- a/library/unix/syscalls.factor +++ b/library/unix/syscalls.factor @@ -5,8 +5,6 @@ USING: alien errors kernel math namespaces ; ! Alien wrappers for various Unix libc functions. -: EINPROGRESS 36 ; - LIBRARY: factor FUNCTION: int err_no ( ) ;