1 ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
3 ;;; --- Foreign type definitions.
6 (in-package :libfixposix
)
8 (include "libfixposix.h")
12 ;;;-------------------------------------------------------------------------
13 ;;; Simple POSIX types
14 ;;;-------------------------------------------------------------------------
17 (ctype size-t
"size_t")
18 (ctype ssize-t
"ssize_t")
20 (ctype time-t
"time_t")
21 (ctype suseconds-t
"suseconds_t")
24 ;;;-------------------------------------------------------------------------
26 ;;;-------------------------------------------------------------------------
28 ;; FIXME: :define-constants doesn't work when
29 ;; the values arent' defined as macros too
30 (cenum (errno-values :define-constants t
)
33 ((:eaddrinuse
"EADDRINUSE"))
34 ((:eaddrnotavail
"EADDRNOTAVAIL"))
35 ((:eafnosupport
"EAFNOSUPPORT"))
36 ((:ealready
"EALREADY"))
38 ((:ebadmsg
"EBADMSG"))
40 ((:ecanceled
"ECANCELED"))
42 ((:econnaborted
"ECONNABORTED"))
43 ((:econnrefused
"ECONNREFUSED"))
44 ((:econnreset
"ECONNRESET"))
45 ((:edeadlk
"EDEADLK"))
46 ((:edestaddrreq
"EDESTADDRREQ"))
52 ((:ehostdown
"EHOSTDOWN"))
53 ((:ehostunreach
"EHOSTUNREACH"))
56 ((:einprogress
"EINPROGRESS"))
60 ((:eisconn
"EISCONN"))
65 ((:emsgsize
"EMSGSIZE"))
66 ((:emultihop
"EMULTIHOP"))
67 ((:enametoolong
"ENAMETOOLONG"))
68 ((:enetdown
"ENETDOWN"))
69 ((:enetreset
"ENETRESET"))
70 ((:enetunreach
"ENETUNREACH"))
72 ((:enobufs
"ENOBUFS"))
73 ((:enodata
"ENODATA"))
76 ((:enoexec
"ENOEXEC"))
78 ((:enolink
"ENOLINK"))
82 ((:enoprotoopt
"ENOPROTOOPT"))
87 ((:enotconn
"ENOTCONN"))
88 ((:enotdir
"ENOTDIR"))
89 ((:enotempty
"ENOTEMPTY"))
90 ((:enotsock
"ENOTSOCK"))
91 ((:enotsup
"ENOTSUP"))
94 ((:eopnotsupp
"EOPNOTSUPP"))
95 ((:eoverflow
"EOVERFLOW"))
99 ((:eprotonosupport
"EPROTONOSUPPORT"))
100 ((:eprototype
"EPROTOTYPE"))
103 ((:eshutdown
"ESHUTDOWN"))
108 ((:etimedout
"ETIMEDOUT"))
109 ((:etxtbsy
"ETXTBSY"))
110 ((:ewouldblock
"EWOULDBLOCK"))
112 ;; ((:ebug "LFP_EBUG"))
116 ;;;-------------------------------------------------------------------------
118 ;;;-------------------------------------------------------------------------
120 (cstruct timeval
"struct timeval"
121 "UNIX time specification in seconds and microseconds."
122 (sec "tv_sec" :type time-t
)
123 (usec "tv_usec" :type suseconds-t
))
125 (constant (fd-setsize "FD_SETSIZE"))
127 (cstruct fd-set
"fd_set"
128 (bits "fds_bits" :type
:uint8
:count
:auto
))
131 ;;;-------------------------------------------------------------------------
133 ;;;-------------------------------------------------------------------------
135 (constant (wnohang "WNOHANG"))
136 (constant (wuntraced "WUNTRACED"))
137 (constant (wcontinued "WCONTINUED"))