3 ;;; This isn't really lisp, but it's definitely a source file.
5 ;;; first, the headers necessary to find definitions of everything
10 "sys/socket.h" "sys/un.h" "netinet/in.h" "netinet/in_systm.h"
11 "netinet/ip.h" "net/if.h" "netinet/tcp.h" "sys/mman.h" "sys/wait.h"
19 ;;; then the stuff we're looking for
20 ((:integer af-inet "AF_INET" "IP Protocol family" t)
28 (:type nlink-t "nlink_t")
29 (:type time-t "time_t")
33 (:integer SIGHUP "SIGHUP" #+sb-doc "terminal line hangup." t)
34 (:integer SIGINT "SIGINT" #+sb-doc "interrupt program." t)
35 (:integer SIGQUIT "SIGQUIT" #+sb-doc "quit program." t)
36 (:integer SIGILL "SIGILL" #+sb-doc "illegal instruction." t)
37 (:integer SIGTRAP "SIGTRAP" #+sb-doc "trace trap." t)
38 (:integer SIGABRT "SIGABRT" #+sb-doc "abort program (formerly SIGIOT)." t)
39 (:integer SIGEMT "SIGEMT" #+sb-doc "emulate instruction executed." t)
40 (:integer SIGFPE "SIGFPE" #+sb-doc "floating-point exception." t)
41 (:integer SIGKILL "SIGKILL" #+sb-doc "kill program." t)
42 (:integer SIGBUS "SIGBUS" #+sb-doc "bus error." t)
43 (:integer SIGSEGV "SIGSEGV" #+sb-doc "segmentation violation." t)
44 (:integer SIGSYS "SIGSYS" #+sb-doc "non-existent system call invoked." t)
45 (:integer SIGPIPE "SIGPIPE" #+sb-doc "write on a pipe with no reader." t)
46 (:integer SIGALRM "SIGALRM" #+sb-doc "real-time timer expired." t)
47 (:integer SIGTERM "SIGTERM" #+sb-doc "software termination signal." t)
48 (:integer SIGURG "SIGURG" #+sb-doc "urgent condition present on socket." t)
49 (:integer SIGSTOP "SIGSTOP" #+sb-doc "stop (cannot be caught or ignored)." t)
50 (:integer SIGTSTP "SIGTSTP" #+sb-doc "stop signal generated from keyboard." t)
51 (:integer SIGCONT "SIGCONT" #+sb-doc "continue after stop." t)
52 (:integer SIGCHLD "SIGCHLD" #+sb-doc "child status has changed." t)
53 (:integer SIGTTIN "SIGTTIN"
54 #+sb-doc "background read attempted from control terminal." t)
55 (:integer SIGTTOU "SIGTTOU"
56 #+sb-doc "background write attempted to control terminal." t)
57 (:integer SIGIO "SIGIO"
58 #+sb-doc "I/O is possible on a descriptor (see fcntl(2))." t)
59 (:integer SIGXCPU "SIGXCPU"
60 #+sb-doc "cpu time limit exceeded (see setrlimit(2))." t)
61 (:integer SIGXFSZ "SIGXFSZ"
62 #+sb-doc "file size limit exceeded (see setrlimit(2))." t)
63 (:integer SIGVTALRM "SIGVTALRM"
64 #+sb-doc "virtual time alarm (see setitimer(2))." t)
65 (:integer SIGPROF "SIGPROF"
66 #+sb-doc "profiling timer alarm (see setitimer(2))." t)
67 (:integer SIGWINCH "SIGWINCH" #+sb-doc "Window size change." t)
68 (:integer SIGINFO "SIGINFO" #+sb-doc "status request from keyboard." t)
69 (:integer SIGUSR1 "SIGUSR1" #+sb-doc "User defined signal 1." t)
70 (:integer SIGUSR2 "SIGUSR2" #+sb-doc "User defined signal 2." t)
71 (:integer SIGRTMIN "SIGRTMIN" #+sb-doc "Smallest real-time signal number." t)
72 (:integer SIGRTMAX "SIGRTMAX" #+sb-doc "Largest real-time signal number." t)
75 (:integer eperm "EPERM" nil t)
76 (:integer enoent "ENOENT" nil t)
77 (:integer esrch "ESRCH" nil t)
78 (:integer eintr "EINTR" nil t)
79 (:integer eio "EIO" nil t)
80 (:integer enxio "ENXIO" nil t)
81 (:integer e2big "E2BIG" nil t)
82 (:integer enoexec "ENOEXEC" nil t)
83 (:integer ebadf "EBADF" nil t)
84 (:integer echild "ECHILD" nil t)
85 (:integer eagain "EAGAIN" nil t)
86 (:integer enomem "ENOMEM" nil t)
87 (:integer eacces "EACCES" nil t)
88 (:integer efault "EFAULT" nil t)
89 (:integer enotblk "ENOTBLK" nil t)
90 (:integer ebusy "EBUSY" nil t)
91 (:integer eexist "EEXIST" nil t)
92 (:integer exdev "EXDEV" nil t)
93 (:integer enodev "ENODEV" nil t)
94 (:integer enotdir "ENOTDIR" nil t)
95 (:integer eisdir "EISDIR" nil t)
96 (:integer einval "EINVAL" nil t)
97 (:integer enfile "ENFILE" nil t)
98 (:integer emfile "EMFILE" nil t)
99 (:integer enotty "ENOTTY" nil t)
100 (:integer etxtbsy "ETXTBSY" nil t)
101 (:integer efbig "EFBIG" nil t)
102 (:integer enospc "ENOSPC" nil t)
103 (:integer espipe "ESPIPE" nil t)
104 (:integer erofs "EROFS" nil t)
105 (:integer emlink "EMLINK" nil t)
106 (:integer epipe "EPIPE" nil t)
107 (:integer edom "EDOM" nil t)
108 (:integer erange "ERANGE" nil t)
109 (:integer edeadlk "EDEADLK" nil t)
110 (:integer enametoolong "ENAMETOOLONG" nil t)
111 (:integer enolck "ENOLCK" nil t)
112 (:integer enosys "ENOSYS" nil t)
113 (:integer enotempty "ENOTEMPTY" nil t)
114 (:integer eloop "ELOOP" nil t)
115 (:integer ewouldblock "EWOULDBLOCK" nil t)
116 (:integer enomsg "ENOMSG" nil t)
117 (:integer eidrm "EIDRM" nil t)
118 (:integer echrng "ECHRNG" nil t)
119 (:integer el2nsync "EL2NSYNC" nil t)
120 (:integer el3hlt "EL3HLT" nil t)
121 (:integer el3rst "EL3RST" nil t)
122 (:integer elnrng "ELNRNG" nil t)
123 (:integer eunatch "EUNATCH" nil t)
124 (:integer enocsi "ENOCSI" nil t)
125 (:integer el2hlt "EL2HLT" nil t)
126 (:integer ebade "EBADE" nil t)
127 (:integer ebadr "EBADR" nil t)
128 (:integer exfull "EXFULL" nil t)
129 (:integer enoano "ENOANO" nil t)
130 (:integer ebadrqc "EBADRQC" nil t)
131 (:integer ebadslt "EBADSLT" nil t)
132 (:integer edeadlock "EDEADLOCK" nil t)
133 (:integer ebfont "EBFONT" nil t)
134 (:integer enostr "ENOSTR" nil t)
135 (:integer enodata "ENODATA" nil t)
136 (:integer etime "ETIME" nil t)
137 (:integer enosr "ENOSR" nil t)
138 (:integer enonet "ENONET" nil t)
139 (:integer enopkg "ENOPKG" nil t)
140 (:integer eremote "EREMOTE" nil t)
141 (:integer enolink "ENOLINK" nil t)
142 (:integer eadv "EADV" nil t)
143 (:integer esrmnt "ESRMNT" nil t)
144 (:integer ecomm "ECOMM" nil t)
145 (:integer eproto "EPROTO" nil t)
146 (:integer emultihop "EMULTIHOP" nil t)
147 (:integer edotdot "EDOTDOT" nil t)
148 (:integer ebadmsg "EBADMSG" nil t)
149 (:integer eoverflow "EOVERFLOW" nil t)
150 (:integer enotuniq "ENOTUNIQ" nil t)
151 (:integer ebadfd "EBADFD" nil t)
152 (:integer eremchg "EREMCHG" nil t)
153 (:integer elibacc "ELIBACC" nil t)
154 (:integer elibbad "ELIBBAD" nil t)
155 (:integer elibscn "ELIBSCN" nil t)
156 (:integer elibmax "ELIBMAX" nil t)
157 (:integer elibexec "ELIBEXEC" nil t)
158 (:integer eilseq "EILSEQ" nil t)
159 (:integer erestart "ERESTART" nil t)
160 (:integer estrpipe "ESTRPIPE" nil t)
161 (:integer eusers "EUSERS" nil t)
162 (:integer enotsock "ENOTSOCK" nil t)
163 (:integer edestaddrreq "EDESTADDRREQ" nil t)
164 (:integer emsgsize "EMSGSIZE" nil t)
165 (:integer eprototype "EPROTOTYPE" nil t)
166 (:integer enoprotoopt "ENOPROTOOPT" nil t)
167 (:integer eprotonosupport "EPROTONOSUPPORT" nil t)
168 (:integer esocktnosupport "ESOCKTNOSUPPORT" nil t)
169 (:integer eopnotsupp "EOPNOTSUPP" nil t)
170 (:integer epfnosupport "EPFNOSUPPORT" nil t)
171 (:integer eafnosupport "EAFNOSUPPORT" nil t)
172 (:integer eaddrinuse "EADDRINUSE" nil t)
173 (:integer eaddrnotavail "EADDRNOTAVAIL" nil t)
174 (:integer enetdown "ENETDOWN" nil t)
175 (:integer enetunreach "ENETUNREACH" nil t)
176 (:integer enetreset "ENETRESET" nil t)
177 (:integer econnaborted "ECONNABORTED" nil t)
178 (:integer econnreset "ECONNRESET" nil t)
179 (:integer enobufs "ENOBUFS" nil t)
180 (:integer eisconn "EISCONN" nil t)
181 (:integer enotconn "ENOTCONN" nil t)
182 (:integer eshutdown "ESHUTDOWN" nil t)
183 (:integer etoomanyrefs "ETOOMANYREFS" nil t)
184 (:integer etimedout "ETIMEDOUT" nil t)
185 (:integer econnrefused "ECONNREFUSED" nil t)
186 (:integer ehostdown "EHOSTDOWN" nil t)
187 (:integer ehostunreach "EHOSTUNREACH" nil t)
188 (:integer ealready "EALREADY" nil t)
189 (:integer einprogress "EINPROGRESS" nil t)
190 (:integer estale "ESTALE" nil t)
191 (:integer euclean "EUCLEAN" nil t)
192 (:integer enotnam "ENOTNAM" nil t)
193 (:integer enavail "ENAVAIL" nil t)
194 (:integer eremoteio "EREMOTEIO" nil t)
195 (:integer edquot "EDQUOT" nil t)
196 (:integer enomedium "ENOMEDIUM" nil t)
197 (:integer emediumtype "EMEDIUMTYPE" nil t)
200 (:integer wnohang "WNOHANG")
201 (:integer wuntraced "WUNTRACED")
204 (:type mode-t "mode_t")
205 (:integer s-isuid "S_ISUID" nil t)
206 (:integer s-isgid "S_ISGID" nil t)
207 (:integer s-isvtx "S_ISVTX" nil t)
208 (:integer s-irusr "S_IRUSR" nil t)
209 (:integer s-iwusr "S_IWUSR" nil t)
210 (:integer s-ixusr "S_IXUSR" nil t)
211 (:integer s-iread "S_IRUSR" nil t)
212 (:integer s-iwrite "S_IWUSR" nil t)
213 (:integer s-iexec "S_IXUSR" nil t)
214 (:integer s-irgrp "S_IRGRP" nil t)
215 (:integer s-iwgrp "S_IWGRP" nil t)
216 (:integer s-ixgrp "S_IXGRP" nil t)
217 (:integer s-iroth "S_IROTH" nil t)
218 (:integer s-iwoth "S_IWOTH" nil t)
219 (:integer s-ixoth "S_IXOTH" nil t)
222 (:integer r-ok "R_OK" nil t)
223 (:integer w-ok "W_OK" nil t)
224 (:integer x-ok "X_OK" nil t)
225 (:integer f-ok "F_OK" nil t)
228 (:type off-t "off_t")
229 (:integer prot-none "PROT_NONE" #+sb-doc "mmap: no protection" t)
230 (:integer prot-read "PROT_READ" #+sb-doc "mmap: read protection" t)
231 (:integer prot-write "PROT_WRITE" #+sb-doc "mmap: write protection" t)
232 (:integer prot-exec "PROT_EXEC" #+sb-doc "mmap: execute protection" t)
233 (:integer map-shared "MAP_SHARED" #+sb-doc "mmap: shared memory" t)
234 (:integer map-private "MAP_PRIVATE" #+sb-doc "mmap: private mapping" t)
235 (:integer map-fixed "MAP_FIXED" #+sb-doc "mmap: map at given location" t)
238 (:integer ms-async "MS_ASYNC" #+sb-doc "msync: return immediately" t)
239 (:integer ms-sync "MS_SYNC" #+sb-doc "msync: perform synchronous writes" t)
240 (:integer ms-invalidate "MS_INVALIDATE"
241 #+sb-doc "msync: invalidate all cached data" t)
246 (:c-string name "char *" "d_name"
247 :distrust-length #+sunos t #-sunos nil)) t)
249 (:structure alien-stat
251 (mode-t mode "mode_t" "st_mode")
252 (ino-t ino "ino_t" "st_ino")
253 (dev-t dev "dev_t" "st_dev")
254 (nlink-t nlink "nlink_t" "st_nlink")
255 (uid-t uid "uid_t" "st_uid")
256 (gid-t gid "gid_t" "st_gid")
257 (off-t size "off_t" "st_size")
258 (time-t atime "time_t" "st_atime")
259 (time-t mtime "time_t" "st_mtime")
260 (time-t ctime "time_t" "st_ctime")))
263 (:integer o-rdonly "O_RDONLY" nil t)
264 (:integer o-wronly "O_WRONLY" nil t)
265 (:integer o-rdwr "O_RDWR" nil t)
266 (:integer o-creat "O_CREAT" nil t)
267 (:integer o-excl "O_EXCL" nil t)
268 (:integer o-noctty "O_NOCTTY" nil t)
269 (:integer o-trunc "O_TRUNC" nil t)
270 (:integer o-append "O_APPEND" nil t)
271 (:integer o-nonblock "O_NONBLOCK" nil t)
272 (:integer o-ndelay "O_NDELAY" nil t)
273 (:integer o-sync "O_SYNC" nil t)
274 (:integer o-nofollow "O_NOFOLLOW" nil t)
275 (:integer o-directory "O_DIRECTORY" nil t)
276 (:integer o-direct "O_DIRECT" nil t)
277 (:integer o-async "O_ASYNC" nil t)
278 (:integer o-largefile "O_LARGEFILE" nil t) ; hmm...
279 (:integer o-dsync "O_DSYNC" nil t)
280 (:integer o-rsync "O_RSYNC" nil t)
283 (:integer seek-set "SEEK_SET" nil t)
284 (:integer seek-cur "SEEK_CUR" nil t)
285 (:integer seek-end "SEEK_END" nil t)
288 (:integer f-dupfd "F_DUPFD" nil t)
289 (:integer f-getfd "F_GETFD" nil t)
290 (:integer f-setfd "F_SETFD" nil t)
291 (:integer f-getfl "F_GETFL" nil t)
292 (:integer f-setfl "F_SETFL" nil t)
293 (:integer f-getlk "F_GETLK" nil t)
294 (:integer f-setlk "F_SETLK" nil t)
295 (:integer f-setlkw "F_SETLKW" nil t)
296 (:integer f-getown "F_GETOWN" nil t)
297 (:integer f-setown "F_SETOWN" nil t)
299 ;; tcgetattr(), tcsetattr()
301 (:type speed-t "speed_t" nil t)
302 (:type tcflag-t "tcflag_t" nil t)
303 (:integer nccs "NCCS" nil t)
305 (:structure alien-termios
307 (tcflag-t iflag "tcflag_t" "c_iflag")
308 (tcflag-t oflag "tcflag_t" "c_oflag")
309 (tcflag-t cflag "tcflag_t" "c_cflag")
310 (tcflag-t lflag "tcflag_t" "c_lflag")
311 ((array cc-t) cc "cc_t" "c_cc")))
313 (:integer veof "VEOF" nil t)
314 (:integer veol "VEOL" nil t)
315 (:integer verase "VERASE" nil t)
316 (:integer vintr "VINTR" nil t)
317 (:integer vkill "VKILL" nil t)
318 (:integer vmin "VMIN" nil t)
319 (:integer vquit "VQUIT" nil t)
320 (:integer vstart "VSTART" nil t)
321 (:integer vstop "VSTOP" nil t)
322 (:integer vsusp "VSUSP" nil t)
323 (:integer vtime "VTIME" nil t)
325 (:integer brkint "BRKINT" nil t)
326 (:integer icrnl "ICRNL" nil t)
327 (:integer ignbrk "IGNBRK" nil t)
328 (:integer igncr "IGNCR" nil t)
329 (:integer ignpar "IGNPAR" nil t)
330 (:integer inlcr "INLCR" nil t)
331 (:integer inpck "INPCK" nil t)
332 (:integer istrip "ISTRIP" nil t)
333 #+xsi ; FIXME: an extension, apparently
334 (:integer ixany "IXANY" nil t)
335 (:integer ixoff "IXOFF" nil t)
336 (:integer ixon "IXON" nil t)
337 (:integer parmrk "PARMRK" nil t)
339 (:integer opost "OPOST" nil t)
341 (:integer onlcr "ONLCR" nil t)
342 (:integer ocrnl "OCRNL" nil t)
343 (:integer onlret "ONLRET" nil t)
344 (:integer ofill "OFILL" nil t)
345 (:integer nldly "NLDLY" nil t)
346 (:integer nl0 "NL0" nil t)
347 (:integer nl1 "NL1" nil t)
348 (:integer crdly "CRDLY" nil t)
349 (:integer cr0 "CR0" nil t)
350 (:integer cr1 "CR1" nil t)
351 (:integer cr2 "CR2" nil t)
352 (:integer cr3 "CR3" nil t)
353 (:integer tabdly "TABDLY" nil t)
354 (:integer tab0 "TAB0" nil t)
355 (:integer tab1 "TAB1" nil t)
356 (:integer tab2 "TAB2" nil t)
357 (:integer tab3 "TAB3" nil t)
358 (:integer bsdly "BSDLY" nil t)
359 (:integer bs0 "BS0" nil t)
360 (:integer bs1 "BS1" nil t)
361 (:integer vtdly "VTDLY" nil t)
362 (:integer vt0 "VT0" nil t)
363 (:integer vt1 "VT1" nil t)
364 (:integer ffdly "FFDLY" nil t)
365 (:integer ff0 "FF0" nil t)
366 (:integer ff1 "FF1" nil t)
368 (:integer b0 "B0" nil t)
369 (:integer b50 "B50" nil t)
370 (:integer b75 "B75" nil t)
371 (:integer b110 "B110" nil t)
372 (:integer b134 "B134" nil t)
373 (:integer b150 "B150" nil t)
374 (:integer b200 "B200" nil t)
375 (:integer b300 "B300" nil t)
376 (:integer b600 "B600" nil t)
377 (:integer b1200 "B1200" nil t)
378 (:integer b1800 "B1800" nil t)
379 (:integer b2400 "B2400" nil t)
380 (:integer b4800 "B4800" nil t)
381 (:integer b9600 "B9600" nil t)
382 (:integer b19200 "B19200" nil t)
383 (:integer b38400 "B38400" nil t)
385 (:integer csize "CSIZE" nil t)
386 (:integer cs5 "CS5" nil t)
387 (:integer cs6 "CS6" nil t)
388 (:integer cs7 "CS7" nil t)
389 (:integer cs8 "CS8" nil t)
390 (:integer cstopb "CSTOPB" nil t)
391 (:integer cread "CREAD" nil t)
392 (:integer parenb "PARENB" nil t)
393 (:integer parodd "PARODD" nil t)
394 (:integer hupcl "HUPCL" nil t)
395 (:integer clocal "CLOCAL" nil t)
397 (:integer echo "ECHO" nil t)
398 (:integer echoe "ECHOE" nil t)
399 (:integer echok "ECHOK" nil t)
400 (:integer echonl "ECHONL" nil t)
401 (:integer icanon "ICANON" nil t)
402 (:integer iexten "IEXTEN" nil t)
403 (:integer isig "ISIG" nil t)
404 (:integer noflsh "NOFLSH" nil t)
405 (:integer tostop "TOSTOP" nil t)
407 (:integer tcsanow "TCSANOW" nil t)
408 (:integer tcsadrain "TCSADRAIN" nil t)
409 (:integer tcsaflush "TCSAFLUSH" nil t)
411 (:integer tciflush "TCIFLUSH" nil t)
412 (:integer tcioflush "TCIOFLUSH" nil t)
413 (:integer tcoflush "TCOFLUSH" nil t)
414 (:integer tcioff "TCIOFF" nil t)
415 (:integer tcion "TCION" nil t)
416 (:integer tcooff "TCOOFF" nil t)
417 (:integer tcoon "TCOON" nil t)