Skip to content

Commit

Permalink
Fix I/O error codes. (fixes #103)
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Aug 11, 2024
1 parent 8cfaced commit 64d81cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
10 changes: 0 additions & 10 deletions src/syscall/main.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@
(defconstant F-SETFL 4.)
(defconstant O-NONBLOCK 4.)

(defconstant EWOULDBLOCK 35.)
(defconstant EPIPE 32.)
(defconstant EINTR 4.)
(defconstant EPROTO 100.)
(defconstant ECONNABORTED 53.)
(defconstant ECONNREFUSED 61.)
(defconstant ECONNRESET 54.)
(defconstant ENOTCONN 57.)
(defconstant EAGAIN 11.)

(defun set-fd-nonblock (fd enabled)
(declare (optimize (speed 3) (safety 0)))
(let ((current-flags (%fcntl/noarg fd F-GETFL)))
Expand Down
11 changes: 10 additions & 1 deletion src/syscall/types.lisp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(include "sys/types.h" "sys/fcntl.h")
(include "sys/types.h" "sys/fcntl.h" "errno.h")
#+(or freebsd bsd)
(include "sys/socket.h")

Expand All @@ -14,3 +14,12 @@
(constant (+SF-MNOWAIT+ "SF_MNOWAIT"))

(constant (+O-RDONLY+ "O_RDONLY"))
(constant (EWOULDBLOCK "EWOULDBLOCK"))
(constant (EPIPE "EPIPE"))
(constant (EINTR "EINTR"))
(constant (EPROTO "EPROTO"))
(constant (ECONNABORTED "ECONNABORTED"))
(constant (ECONNREFUSED "ECONNREFUSED"))
(constant (ECONNRESET "ECONNRESET"))
(constant (ENOTCONN "ENOTCONN"))
(constant (EAGAIN "EAGAIN"))

0 comments on commit 64d81cd

Please sign in to comment.