Fix filename splitting into name/type
[iolib.git] / src / libfixposix / ffi-types.lisp
blob967c5a57912865be41df31bd0d0ba5999d671524
1 ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Foreign type definitions.
4 ;;;
6 (in-package :libfixposix)
8 (include "libfixposix.h")
12 ;;;-------------------------------------------------------------------------
13 ;;; Simple POSIX types
14 ;;;-------------------------------------------------------------------------
16 (ctype bool "bool")
17 (ctype size-t "size_t")
18 (ctype ssize-t "ssize_t")
19 (ctype off-t "off_t")
20 (ctype time-t "time_t")
21 (ctype suseconds-t "suseconds_t")
24 ;;;-------------------------------------------------------------------------
25 ;;; errno.h
26 ;;;-------------------------------------------------------------------------
28 ;; FIXME: :define-constants doesn't work when
29 ;; the values arent' defined as macros too
30 (cenum (errno-values :define-constants t)
31 ((:e2big "E2BIG"))
32 ((:eacces "EACCES"))
33 ((:eaddrinuse "EADDRINUSE"))
34 ((:eaddrnotavail "EADDRNOTAVAIL"))
35 ((:eafnosupport "EAFNOSUPPORT"))
36 ((:ealready "EALREADY"))
37 ((:ebadf "EBADF"))
38 ((:ebadmsg "EBADMSG"))
39 ((:ebusy "EBUSY"))
40 ((:ecanceled "ECANCELED"))
41 ((:echild "ECHILD"))
42 ((:econnaborted "ECONNABORTED"))
43 ((:econnrefused "ECONNREFUSED"))
44 ((:econnreset "ECONNRESET"))
45 ((:edeadlk "EDEADLK"))
46 ((:edestaddrreq "EDESTADDRREQ"))
47 ((:edom "EDOM"))
48 ((:edquot "EDQUOT"))
49 ((:eexist "EEXIST"))
50 ((:efault "EFAULT"))
51 ((:efbig "EFBIG"))
52 ((:ehostdown "EHOSTDOWN"))
53 ((:ehostunreach "EHOSTUNREACH"))
54 ((:eidrm "EIDRM"))
55 ((:eilseq "EILSEQ"))
56 ((:einprogress "EINPROGRESS"))
57 ((:eintr "EINTR"))
58 ((:einval "EINVAL"))
59 ((:eio "EIO"))
60 ((:eisconn "EISCONN"))
61 ((:eisdir "EISDIR"))
62 ((:eloop "ELOOP"))
63 ((:emfile "EMFILE"))
64 ((:emlink "EMLINK"))
65 ((:emsgsize "EMSGSIZE"))
66 ((:emultihop "EMULTIHOP"))
67 ((:enametoolong "ENAMETOOLONG"))
68 ((:enetdown "ENETDOWN"))
69 ((:enetreset "ENETRESET"))
70 ((:enetunreach "ENETUNREACH"))
71 ((:enfile "ENFILE"))
72 ((:enobufs "ENOBUFS"))
73 ((:enodata "ENODATA"))
74 ((:enodev "ENODEV"))
75 ((:enoent "ENOENT"))
76 ((:enoexec "ENOEXEC"))
77 ((:enolck "ENOLCK"))
78 ((:enolink "ENOLINK"))
79 ((:enomem "ENOMEM"))
80 ((:enomsg "ENOMSG"))
81 ((:enonet "ENONET"))
82 ((:enoprotoopt "ENOPROTOOPT"))
83 ((:enospc "ENOSPC"))
84 ((:enosr "ENOSR"))
85 ((:enostr "ENOSTR"))
86 ((:enosys "ENOSYS"))
87 ((:enotconn "ENOTCONN"))
88 ((:enotdir "ENOTDIR"))
89 ((:enotempty "ENOTEMPTY"))
90 ((:enotsock "ENOTSOCK"))
91 ((:enotsup "ENOTSUP"))
92 ((:enotty "ENOTTY"))
93 ((:enxio "ENXIO"))
94 ((:eopnotsupp "EOPNOTSUPP"))
95 ((:eoverflow "EOVERFLOW"))
96 ((:eperm "EPERM"))
97 ((:epipe "EPIPE"))
98 ((:eproto "EPROTO"))
99 ((:eprotonosupport "EPROTONOSUPPORT"))
100 ((:eprototype "EPROTOTYPE"))
101 ((:erange "ERANGE"))
102 ((:erofs "EROFS"))
103 ((:eshutdown "ESHUTDOWN"))
104 ((:espipe "ESPIPE"))
105 ((:esrch "ESRCH"))
106 ((:estale "ESTALE"))
107 ((:etime "ETIME"))
108 ((:etimedout "ETIMEDOUT"))
109 ((:etxtbsy "ETXTBSY"))
110 ((:ewouldblock "EWOULDBLOCK"))
111 ((:exdev "EXDEV"))
112 ;; ((:ebug "LFP_EBUG"))
116 ;;;-------------------------------------------------------------------------
117 ;;; sys/select.h
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 ;;;-------------------------------------------------------------------------
132 ;;; sys/wait.h
133 ;;;-------------------------------------------------------------------------
135 (constant (wnohang "WNOHANG"))
136 (constant (wuntraced "WUNTRACED"))
137 (constant (wcontinued "WCONTINUED"))