Add function FILE-PATH.
[iolib.git] / syscalls / pkgdcl.lisp
blob89dd7f0366462286de9d130c6d9528516442472c
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Package definition.
4 ;;;
6 (in-package :common-lisp-user)
8 (defpackage :iolib.syscalls
9 (:nicknames #:isys)
10 (:use :iolib.base :cffi)
11 (:export
12 ;; Conditions
13 #:condition-info-mixin
14 #:system-error
15 #:syscall-error
16 #:posix-error
17 #:poll-error
18 #:poll-timeout
20 ;; Condition accessors
21 #:code-of
22 #:identifier-of
23 #:message-of
24 #:event-type-of
25 #:os-handle-of
27 ;; Pathname Functions
28 #:native-namestring
30 ;; Type Designators
31 #:filename
32 #:filename-designator
33 #:pointer-or-nil
34 #:pointer-or-nil-designator
35 #:bool
36 #:bool-designator
38 ;; Misc
39 #:repeat-decreasing-timeout
40 #:repeat-upon-condition-decreasing-timeout
42 ;; Return wrapper
43 #:return-wrapper
44 #:error-predicate-of
45 #:return-filter-of
46 #:error-generator-of
47 #:base-type-of
48 #:never-fails
49 #:signal-posix-error
50 #:signal-posix-error/restart
52 ;; Syscall definition
53 #:defentrypoint
54 #:defcfun*
55 #:defsyscall
56 #:defsyscall*
58 ;;;--------------------------------------------------------------------------
59 ;;; Syscalls
60 ;;;--------------------------------------------------------------------------
62 ;; Specials
63 #:*default-open-mode*
64 #:*environ*
66 ;; Errno-related functions
67 #:%sys-strerror
68 #:%sys-errno
70 ;; Memory manipulation functions
71 #:%sys-memset
72 #:%sys-bzero
73 #:%sys-memcpy
74 #:%sys-memmove
76 ;; Files
77 #:%sys-read
78 #:%sys-write
79 #:%sys-pread
80 #:%sys-pwrite
81 #:%sys-open
82 #:%sys-creat
83 #:%sys-pipe
84 #:%sys-mkfifo
85 #:%sys-umask
86 #:%sys-lseek
87 #:%sys-access
88 #:%sys-truncate
89 #:%sys-ftruncate
90 #:%sys-rename
91 #:%sys-link
92 #:%sys-symlink
93 #:%sys-readlink
94 #:%sys-unlink
95 #:%sys-chown
96 #:%sys-fchown
97 #:%sys-lchown
98 #:%sys-chmod
99 #:%sys-fchmod
100 #:%sys-stat
101 #:%sys-fstat
102 #:%sys-lstat
103 #:%sys-sync
104 #:%sys-fsync
105 #:%sys-mkstemp
107 ;; Directories
108 #:%sys-mkdir
109 #:%sys-rmdir
110 #:%sys-chdir
111 #:%sys-fchdir
112 #:%sys-getcwd
113 #:%sys-mkdtemp
115 ;; File descriptors
116 #:%sys-close
117 #:%sys-dup
118 #:%sys-dup2
119 #:%sys-ioctl/2
120 #:%sys-ioctl/3
121 #:%sys-fd-open-p
123 ;; I/O Polling
124 #:%sys-poll
126 ;; Memory mapping
127 #:%sys-mmap
128 #:%sys-munmap
130 ;; Time
131 #:%sys-usleep
132 #:%sys-time
133 #:%sys-gettimeofday
134 #:%sys-get-monotonic-time
136 ;; Environment
137 #:%sys-getenv
138 #:%sys-setenv
139 #:%sys-unsetenv
141 ;; Local info
142 #:%sys-gethostname
143 #:%sys-getdomainname
145 ;;;--------------------------------------------------------------------------
146 ;;; Foreign types and constants
147 ;;;--------------------------------------------------------------------------
149 ;; Primitive type sizes
150 #:size-of-char
151 #:size-of-short
152 #:size-of-int
153 #:size-of-long
154 #:size-of-long-long
155 #:size-of-pointer
157 ;; Types
158 #:size-t #:size-of-size-t
159 #:ssize-t #:size-of-ssize-t
160 #:pid-t #:size-of-pid-t
161 #:gid-t #:size-of-gid-t
162 #:uid-t #:size-of-uid-t
163 #:off-t #:size-of-off-t
164 #:mode-t #:size-of-mode-t
165 #:time-t #:size-of-time-t
166 #:useconds-t #:size-of-useconds-t
167 #:suseconds-t #:size-of-suseconds-t
168 #:dev-t #:size-of-dev-t
169 #:ino-t #:size-of-ino-t
170 #:nlink-t #:size-of-nlink-t
171 #:blksize-t #:size-of-blksize-t
172 #:blkcnt-t #:size-of-blkcnt-t
173 #:nfds-t #:size-of-nfds-t
175 ;; OPEN()
176 #:o-rdonly
177 #:o-wronly
178 #:o-rdwr
179 #:o-creat
180 #:o-excl
181 #:o-trunc
182 #:o-append
183 #:o-noctty
184 #:o-nonblock
185 #:o-ndelay
186 #:o-sync
187 #:o-nofollow
188 #:o-async
190 ;; LSEEK()
191 #:seek-set
192 #:seek-cur
193 #:seek-end
195 ;; ACCESS()
196 #:r-ok
197 #:w-ok
198 #:x-ok
199 #:f-ok
201 ;; STAT()
202 #:s-irwxu
203 #:s-irusr
204 #:s-iwusr
205 #:s-ixusr
206 #:s-ifmt
207 #:s-ififo
208 #:s-ifchr
209 #:s-ifdir
210 #:s-ifblk
211 #:s-ifreg
212 #:s-ifwht
213 #:s-iread
214 #:s-iwrite
215 #:s-iexec
216 #:s-irwxg
217 #:s-irgrp
218 #:s-iwgrp
219 #:s-ixgrp
220 #:s-irwxo
221 #:s-iroth
222 #:s-iwoth
223 #:s-ixoth
224 #:s-isuid
225 #:s-isgid
226 #:s-isvtx
227 #:s-iflnk
228 #:s-ifsock
229 #:path-max
231 ;; MMAP()
232 #:prot-none
233 #:prot-read
234 #:prot-write
235 #:prot-exec
236 #:map-shared
237 #:map-private
238 #:map-fixed
239 #:map-failed
241 ;; POLL()
242 #:pollin
243 #:pollrdnorm
244 #:pollrdband
245 #:pollpri
246 #:pollout
247 #:pollwrnorm
248 #:pollwrband
249 #:pollerr
250 #:pollrdhup
251 #:pollhup
252 #:pollnval
254 ;; IOCTL()
255 #:fionbio
256 #:fionread
258 ;;; Structs
260 ;; timespec
261 #:timespec #:size-of-timespec
262 #:sec
263 #:nsec
265 ;; timeval
266 #:timeval #:size-of-timeval
267 #:sec
268 #:usec
270 ;; stat
271 #:stat #:size-of-stat
272 #:dev #:stat-dev
273 #:ino #:stat-ino
274 #:mode #:stat-mode
275 #:nlink #:stat-nlink
276 #:uid #:stat-uid
277 #:gid #:stat-gid
278 #:rdev #:stat-rdev
279 #:size #:stat-size
280 #:blksize #:stat-blksize
281 #:blocks #:stat-blocks
282 #:atime #:stat-atime
283 #:mtime #:stat-mtime
284 #:ctime #:stat-ctime
286 ;; pollfd
287 #:pollfd #:size-of-pollfd
288 #:fd
289 #:events
290 #:revents
292 ;; Syscall error codes
293 #:errno-values
294 #:eperm #:enoent #:esrch #:eintr #:eio #:enxio #:e2big #:enoexec
295 #:ebadf #:echild #:eagain #:enomem #:eacces #:efault #:ebusy #:eexist
296 #:exdev #:enodev #:enotdir #:eisdir #:einval #:enfile #:emfile
297 #:enotty #:efbig #:enospc #:espipe #:erofs #:emlink #:epipe #:edom
298 #:erange #:edeadlk #:enametoolong #:enolck #:enosys #:enotempty
299 #:echrng #:el2nsync #:el3hlt #:el3rst #:elnrng #:eunatch #:enocsi
300 #:el2hlt #:ebade #:ebadr #:exfull #:enoano #:ebadrqc #:ebadslt
301 #:edeadlock #:ebfont #:enostr #:enodata #:etime #:enosr #:enopkg
302 #:eadv #:esrmnt #:ecomm #:edotdot #:enotuniq #:ebadfd #:elibscn
303 #:elibmax #:elibexec #:eilseq #:erestart #:estrpipe #:euclean
304 #:enotnam #:enavail #:eremoteio #:enomedium #:emediumtype #:estale
305 #:enotblk #:etxtbsy #:eusers #:eloop #:ewouldblock #:enomsg #:eidrm
306 #:eproto #:emultihop #:ebadmsg #:eoverflow #:edquot #:einprogress
307 #:ealready #:eprotonosupport #:esocktnosupport #:enotsock
308 #:edestaddrreq #:emsgsize #:eprototype #:enoprotoopt #:eremote
309 #:enolink #:epfnosupport #:eafnosupport #:eaddrinuse #:eaddrnotavail
310 #:enetdown #:enetunreach #:enetreset #:econnaborted #:econnreset
311 #:eisconn #:enotconn #:eshutdown #:etoomanyrefs #:etimedout
312 #:econnrefused #:ehostdown #:ehostunreach #:enonet #:enobufs
313 #:eopnotsupp