0b66705951532e210f8a46c919d5c1f787aea1eb
[sbcl.git] / contrib / sb-posix / constants.lisp
1 ;;; -*- Lisp -*-
2
3 ;;; This isn't really lisp, but it's definitely a source file.
4
5 ;;; first, the headers necessary to find definitions of everything
6 (#||#
7  "sys/types.h"
8  "sys/stat.h"
9  #-win32 "utime.h"
10  #-win32 "sys/socket.h"
11  #-win32 "sys/un.h"
12  #-win32 "netinet/in.h"
13  #-win32 "netinet/in_systm.h"
14  #-win32 "netinet/ip.h"
15  #-win32 "net/if.h"
16  #-win32 "netinet/tcp.h"
17  #-win32 "sys/mman.h"
18  #-win32 "sys/wait.h"
19  "fcntl.h"
20  #-win32 "netdb.h"
21  "errno.h"
22  "dirent.h" "signal.h"
23  #-win32 "pwd.h"
24  #-win32 "grp.h"
25  "unistd.h"
26  #-win32 "termios.h"
27  #-win32 "syslog.h")
28
29 ;;; then the stuff we're looking for
30 ((:integer af-inet "AF_INET" "IP Protocol family" t)
31
32  ;; KLUDGE: These types simply do not seem to exist on Windows,
33  ;; but we'll provide these anyways -- at least in a way that should
34  ;; match with stat.
35  (:type uid-t   #-win32 "uid_t"   #+win32 "short")
36  (:type gid-t   #-win32 "gid_t"   #+win32 "short")
37  (:type nlink-t #-win32 "nlink_t" #+win32 "short")
38
39  (:type pid-t "pid_t")
40  (:type ino-t "ino_t")
41
42  (:type time-t "time_t")
43  (:type dev-t "dev_t")
44
45  ;; signals
46  (:integer SIGHUP "SIGHUP" "terminal line hangup." t)
47  (:integer SIGINT "SIGINT" "interrupt program." t)
48  (:integer SIGQUIT "SIGQUIT" "quit program." t)
49  (:integer SIGILL "SIGILL" "illegal instruction." t)
50  (:integer SIGTRAP "SIGTRAP" "trace trap." t)
51  (:integer SIGABRT "SIGABRT" "abort program (formerly SIGIOT)." t)
52  (:integer SIGEMT "SIGEMT" "emulate instruction executed." t)
53  (:integer SIGFPE "SIGFPE" "floating-point exception." t)
54  (:integer SIGKILL "SIGKILL" "kill program." t)
55  (:integer SIGBUS "SIGBUS" "bus error." t)
56  (:integer SIGSEGV "SIGSEGV" "segmentation violation." t)
57  (:integer SIGSYS "SIGSYS" "non-existent system call invoked." t)
58  (:integer SIGPIPE "SIGPIPE" "write on a pipe with no reader." t)
59  (:integer SIGALRM "SIGALRM" "real-time timer expired." t)
60  (:integer SIGTERM "SIGTERM" "software termination signal." t)
61  (:integer SIGURG "SIGURG" "urgent condition present on socket." t)
62  (:integer SIGSTOP "SIGSTOP" "stop (cannot be caught or ignored)." t)
63  (:integer SIGTSTP "SIGTSTP" "stop signal generated from keyboard." t)
64  (:integer SIGCONT "SIGCONT" "continue after stop." t)
65  (:integer SIGCHLD "SIGCHLD" "child status has changed." t)
66  (:integer SIGTTIN "SIGTTIN"
67            "background read attempted from control terminal." t)
68  (:integer SIGTTOU "SIGTTOU"
69            "background write attempted to control terminal." t)
70  (:integer SIGIO "SIGIO"
71            "I/O is possible on a descriptor (see fcntl(2))." t)
72  (:integer SIGXCPU "SIGXCPU"
73            "cpu time limit exceeded (see setrlimit(2))." t)
74  (:integer SIGXFSZ "SIGXFSZ"
75            "file size limit exceeded (see setrlimit(2))." t)
76  (:integer SIGVTALRM "SIGVTALRM"
77            "virtual time alarm (see setitimer(2))." t)
78  (:integer SIGPROF "SIGPROF"
79            "profiling timer alarm (see setitimer(2))." t)
80  (:integer SIGWINCH "SIGWINCH" "Window size change." t)
81  (:integer SIGPWR "SIGPWR" "Power failure." t)
82  (:integer SIGUSR1 "SIGUSR1" "User defined signal 1." t)
83  (:integer SIGUSR2 "SIGUSR2" "User defined signal 2." t)
84  (:integer SIGRTMIN "SIGRTMIN" "Smallest real-time signal number." t)
85  (:integer SIGRTMAX "SIGRTMAX" "Largest real-time signal number." t)
86
87  ;; error numbers
88  (:errno eperm "EPERM" nil t)
89  (:errno enoent "ENOENT" nil t)
90  (:errno esrch "ESRCH" nil t)
91  (:errno eintr "EINTR" nil t)
92  (:errno eio "EIO" nil t)
93  (:errno enxio "ENXIO" nil t)
94  (:errno e2big "E2BIG" nil t)
95  (:errno enoexec "ENOEXEC" nil t)
96  (:errno ebadf "EBADF" nil t)
97  (:errno echild "ECHILD" nil t)
98  (:errno eagain "EAGAIN" nil t)
99  (:errno enomem "ENOMEM" nil t)
100  (:errno eacces "EACCES" nil t)
101  (:errno efault "EFAULT" nil t)
102  (:errno enotblk "ENOTBLK" nil t)
103  (:errno ebusy "EBUSY" nil t)
104  (:errno eexist "EEXIST" nil t)
105  (:errno exdev "EXDEV" nil t)
106  (:errno enodev "ENODEV" nil t)
107  (:errno enotdir "ENOTDIR" nil t)
108  (:errno eisdir "EISDIR" nil t)
109  (:errno einval "EINVAL" nil t)
110  (:errno enfile "ENFILE" nil t)
111  (:errno emfile "EMFILE" nil t)
112  (:errno enotty "ENOTTY" nil t)
113  (:errno etxtbsy "ETXTBSY" nil t)
114  (:errno efbig "EFBIG" nil t)
115  (:errno enospc "ENOSPC" nil t)
116  (:errno espipe "ESPIPE" nil t)
117  (:errno erofs "EROFS" nil t)
118  (:errno emlink "EMLINK" nil t)
119  (:errno epipe "EPIPE" nil t)
120  (:errno edom "EDOM" nil t)
121  (:errno erange "ERANGE" nil t)
122  (:errno edeadlk "EDEADLK" nil t)
123  (:errno enametoolong "ENAMETOOLONG" nil t)
124  (:errno enolck "ENOLCK" nil t)
125  (:errno enosys "ENOSYS" nil t)
126  (:errno enotempty "ENOTEMPTY" nil t)
127  (:errno eloop "ELOOP" nil t)
128  (:errno ewouldblock "EWOULDBLOCK" nil t)
129  (:errno enomsg "ENOMSG" nil t)
130  (:errno eidrm "EIDRM" nil t)
131  (:errno echrng "ECHRNG" nil t)
132  (:errno el2nsync "EL2NSYNC" nil t)
133  (:errno el3hlt "EL3HLT" nil t)
134  (:errno el3rst "EL3RST" nil t)
135  (:errno elnrng "ELNRNG" nil t)
136  (:errno eunatch "EUNATCH" nil t)
137  (:errno enocsi "ENOCSI" nil t)
138  (:errno el2hlt "EL2HLT" nil t)
139  (:errno ebade "EBADE" nil t)
140  (:errno ebadr "EBADR" nil t)
141  (:errno exfull "EXFULL" nil t)
142  (:errno enoano "ENOANO" nil t)
143  (:errno ebadrqc "EBADRQC" nil t)
144  (:errno ebadslt "EBADSLT" nil t)
145  (:errno edeadlock "EDEADLOCK" nil t)
146  (:errno ebfont "EBFONT" nil t)
147  (:errno enostr "ENOSTR" nil t)
148  (:errno enodata "ENODATA" nil t)
149  (:errno etime "ETIME" nil t)
150  (:errno enosr "ENOSR" nil t)
151  (:errno enonet "ENONET" nil t)
152  (:errno enopkg "ENOPKG" nil t)
153  (:errno eremote "EREMOTE" nil t)
154  (:errno enolink "ENOLINK" nil t)
155  (:errno eadv "EADV" nil t)
156  (:errno esrmnt "ESRMNT" nil t)
157  (:errno ecomm "ECOMM" nil t)
158  (:errno eproto "EPROTO" nil t)
159  (:errno emultihop "EMULTIHOP" nil t)
160 #-sunos (:errno edotdot "EDOTDOT" nil t)
161  (:errno ebadmsg "EBADMSG" nil t)
162  (:errno eoverflow "EOVERFLOW" nil t)
163  (:errno enotuniq "ENOTUNIQ" nil t)
164  (:errno ebadfd "EBADFD" nil t)
165  (:errno eremchg "EREMCHG" nil t)
166  (:errno elibacc "ELIBACC" nil t)
167  (:errno elibbad "ELIBBAD" nil t)
168  (:errno elibscn "ELIBSCN" nil t)
169  (:errno elibmax "ELIBMAX" nil t)
170  (:errno elibexec "ELIBEXEC" nil t)
171  (:errno eilseq "EILSEQ" nil t)
172  (:errno erestart "ERESTART" nil t)
173  (:errno estrpipe "ESTRPIPE" nil t)
174  (:errno eusers "EUSERS" nil t)
175  (:errno enotsock "ENOTSOCK" nil t)
176  (:errno edestaddrreq "EDESTADDRREQ" nil t)
177  (:errno emsgsize "EMSGSIZE" nil t)
178  (:errno eprototype "EPROTOTYPE" nil t)
179  (:errno enoprotoopt "ENOPROTOOPT" nil t)
180  (:errno eprotonosupport "EPROTONOSUPPORT" nil t)
181  (:errno esocktnosupport "ESOCKTNOSUPPORT" nil t)
182  (:errno eopnotsupp "EOPNOTSUPP" nil t)
183  (:errno epfnosupport "EPFNOSUPPORT" nil t)
184  (:errno eafnosupport "EAFNOSUPPORT" nil t)
185  (:errno eaddrinuse "EADDRINUSE" nil t)
186  (:errno eaddrnotavail "EADDRNOTAVAIL" nil t)
187  (:errno enetdown "ENETDOWN" nil t)
188  (:errno enetunreach "ENETUNREACH" nil t)
189  (:errno enetreset "ENETRESET" nil t)
190  (:errno econnaborted "ECONNABORTED" nil t)
191  (:errno econnreset "ECONNRESET" nil t)
192  (:errno enobufs "ENOBUFS" nil t)
193  (:errno eisconn "EISCONN" nil t)
194  (:errno enotconn "ENOTCONN" nil t)
195  (:errno eshutdown "ESHUTDOWN" nil t)
196  (:errno etoomanyrefs "ETOOMANYREFS" nil t)
197  (:errno etimedout "ETIMEDOUT" nil t)
198  (:errno econnrefused "ECONNREFUSED" nil t)
199  (:errno ehostdown "EHOSTDOWN" nil t)
200  (:errno ehostunreach "EHOSTUNREACH" nil t)
201  (:errno ealready "EALREADY" nil t)
202  (:errno einprogress "EINPROGRESS" nil t)
203  (:errno estale "ESTALE" nil t)
204 #-sunos (:errno euclean "EUCLEAN" nil t)
205 #-sunos (:errno enotnam "ENOTNAM" nil t)
206 #-sunos (:errno enavail "ENAVAIL" nil t)
207 #-sunos (:errno eremoteio "EREMOTEIO" nil t)
208 #-sunos (:errno edquot "EDQUOT" nil t)
209 #-sunos (:errno enomedium "ENOMEDIUM" nil t)
210 #-sunos (:errno emediumtype "EMEDIUMTYPE" nil t)
211
212  ;; wait
213  (:integer wnohang "WNOHANG" nil t)
214  (:integer wuntraced "WUNTRACED" nil t)
215
216  ;; mode_t
217  (:type mode-t "mode_t")
218  (:integer s-ifmt "S_IFMT" nil t)
219  (:integer s-ififo "S_IFIFO" nil t)
220  (:integer s-ifchr "S_IFCHR" nil t)
221  (:integer s-ifdir "S_IFDIR" nil t)
222  (:integer s-ifblk "S_IFBLK" nil t)
223  (:integer s-ifreg "S_IFREG" nil t)
224  (:integer s-iflnk "S_IFLNK" nil t)
225  (:integer s-ifsock "S_IFSOCK" nil t)
226 #-sunos (:integer s-ifwht "S_IFWHT" nil t)
227  (:integer s-isuid "S_ISUID" nil t)
228  (:integer s-isgid "S_ISGID" nil t)
229  (:integer s-isvtx "S_ISVTX" nil t)
230  (:integer s-irusr "S_IRUSR" nil t)
231  (:integer s-iwusr "S_IWUSR" nil t)
232  (:integer s-ixusr "S_IXUSR" nil t)
233  (:integer s-iread "S_IRUSR" nil t)
234  (:integer s-iwrite "S_IWUSR" nil t)
235  (:integer s-iexec "S_IXUSR" nil t)
236  (:integer s-irgrp "S_IRGRP" nil t)
237  (:integer s-iwgrp "S_IWGRP" nil t)
238  (:integer s-ixgrp "S_IXGRP" nil t)
239  (:integer s-iroth "S_IROTH" nil t)
240  (:integer s-iwoth "S_IWOTH" nil t)
241  (:integer s-ixoth "S_IXOTH" nil t)
242
243  ;; access()
244  (:integer r-ok "R_OK" nil t)
245  (:integer w-ok "W_OK" nil t)
246  (:integer x-ok "X_OK" nil t)
247  (:integer f-ok "F_OK" nil t)
248
249  ;; mmap()
250  (:type off-t "off_t")
251  (:integer prot-none "PROT_NONE" "mmap: no protection" t)
252  (:integer prot-read "PROT_READ" "mmap: read protection" t)
253  (:integer prot-write "PROT_WRITE" "mmap: write protection" t)
254  (:integer prot-exec "PROT_EXEC" "mmap: execute protection" t)
255  (:integer map-shared "MAP_SHARED" "mmap: shared memory" t)
256  (:integer map-private "MAP_PRIVATE" "mmap: private mapping" t)
257  (:integer map-fixed "MAP_FIXED" "mmap: map at given location" t)
258  (:integer map-anon "MAP_ANON" "mmap: anonymous mapping not associated with any file" t)
259
260  ;; msync()
261  (:integer ms-async "MS_ASYNC" "msync: return immediately" t)
262  (:integer ms-sync "MS_SYNC" "msync: perform synchronous writes" t)
263  (:integer ms-invalidate "MS_INVALIDATE"
264            "msync: invalidate all cached data" t)
265
266  ;; mlockall()
267  (:integer mcl-current "MCL_CURRENT" "mlockall: lock all pages which are currently mapped into the address space of the process." t)
268  (:integer mcl-future "MCL_FUTURE" "mlockall: lock all pages which will become mapped into the address space of the process in the future." t)
269
270  ;; opendir()
271  (:structure dirent
272              (#+(and linux largefile) "struct dirent64"
273               #-(and linux largefile) "struct dirent"
274               #-win32 (:ino-t ino "ino_t" "d_ino")
275               (:c-string name "char *" "d_name"
276                          ;; FIXME: sunos should really have :distrust-length
277                          ;; t, but this is currently broken. -- Jim Wise 2010-08-31
278                          :distrust-length nil)) t)
279
280  ;; password database
281  #-win32
282  (:structure alien-passwd
283              ("struct passwd"
284               (c-string-pointer name "char *" "pw_name")
285               (c-string-pointer passwd "char *" "pw_passwd")
286               (uid-t uid "uid_t" "pw_uid")
287               (gid-t gid "gid_t" "pw_gid")
288               ;; 'change', 'class', and 'expire' are not supported on Linux
289               #+nil
290               (time-t change "time_t" "pw_change")
291               #+nil
292               (c-string-pointer class "char *" "pw_class")
293               (c-string-pointer gecos "char *" "pw_gecos")
294               (c-string-pointer dir "char *" "pw_dir")
295               (c-string-pointer shell "char *" "pw_shell")
296               #+nil
297               (time-t expire "time_t" "pw_expire")
298               ;; OS X manpages say this exists.  they lie!
299               #+nil
300               (:integer fields "int" "pw_fields")))
301
302  ;; group database
303  #-win32
304  (:structure alien-group
305              ("struct group"
306               (c-string-pointer name "char *" "gr_name")
307               (c-string-pointer passwd "char *" "gr_passwd")
308               (gid-t gid "gid_t" "gr_gid")))
309
310  (:structure alien-stat
311              ("struct stat"
312               (mode-t mode "mode_t" "st_mode")
313               (ino-t ino "ino_t" "st_ino")
314               ;; Linux/MIPS uses unsigned long instead of dev_t here.
315               #-mips
316               (dev-t dev "dev_t" "st_dev")
317               #+mips
318               ((unsigned 32) dev "dev_t" "st_dev")
319               (nlink-t nlink "nlink_t" "st_nlink")
320               (uid-t uid "uid_t" "st_uid")
321               #-mips
322               (dev-t rdev "dev_t" "st_rdev")
323               (gid-t gid "gid_t" "st_gid")
324               (off-t size "off_t" "st_size")
325               (time-t atime "time_t" "st_atime")
326               (time-t mtime "time_t" "st_mtime")
327               (time-t ctime "time_t" "st_ctime")))
328
329  #+darwin
330  (:structure alien-timespec
331              ("struct timespec"
332               (time-t tv-sec "time_t" "tv_sec")
333               (long tv-nsec "long" "tv_nsec")))
334
335  ;; open()
336  (:integer o-rdonly "O_RDONLY" nil t)
337  (:integer o-wronly "O_WRONLY" nil t)
338  (:integer o-rdwr "O_RDWR" nil t)
339  (:integer o-creat "O_CREAT" nil t)
340  (:integer o-excl "O_EXCL" nil t)
341  (:integer o-noctty "O_NOCTTY" nil t)
342  (:integer o-trunc "O_TRUNC" nil t)
343  (:integer o-append "O_APPEND" nil t)
344  (:integer o-nonblock "O_NONBLOCK" nil t)
345  (:integer o-ndelay "O_NDELAY" nil t)
346  (:integer o-sync "O_SYNC" nil t)
347  (:integer o-nofollow "O_NOFOLLOW" nil t)
348 #-sunos (:integer o-directory "O_DIRECTORY" nil t)
349 #-sunos (:integer o-direct "O_DIRECT" nil t)
350 #-sunos (:integer o-async "O_ASYNC" nil t)
351  (:integer o-largefile "O_LARGEFILE" nil t)     ; hmm...
352  (:integer o-dsync "O_DSYNC" nil t)
353  (:integer o-rsync "O_RSYNC" nil t)
354
355  ;; lseek()
356  (:integer seek-set "SEEK_SET" nil t)
357  (:integer seek-cur "SEEK_CUR" nil t)
358  (:integer seek-end "SEEK_END" nil t)
359
360  ;; fcntl()
361  (:integer f-dupfd "F_DUPFD" nil t)
362  (:integer f-getfd "F_GETFD" nil t)
363  (:integer f-setfd "F_SETFD" nil t)
364  (:integer f-getfl "F_GETFL" nil t)
365  (:integer f-setfl "F_SETFL" nil t)
366  (:integer f-getlk "F_GETLK" nil t)
367  (:integer f-setlk "F_SETLK" nil t)
368  (:integer f-setlkw "F_SETLKW" nil t)
369  (:integer f-getown "F_GETOWN" nil t)
370  (:integer f-setown "F_SETOWN" nil t)
371  (:integer f-rdlck "F_RDLCK" nil t)
372  (:integer f-wrlck "F_WRLCK" nil t)
373  (:integer f-unlck "F_UNLCK" nil t)
374
375  #-win32
376  (:structure alien-flock
377              ("struct flock"
378               (short type "short" "l_type")
379               (short whence "short" "l_whence")
380               (off-t start "off_t" "l_start")
381               (off-t len "off_t" "l_len")
382               (pid-t pid "pid_t" "l_pid")))
383
384  ;; lockf()
385  (:integer f-lock "F_LOCK" nil t)
386  (:integer f-tlock "F_TLOCK" nil t)
387  (:integer f-ulock "F_ULOCK" nil t)
388  (:integer f-test "F_TEST" nil t)
389
390  ;; tcgetattr(), tcsetattr()
391  #-win32
392  (:type cc-t "cc_t")
393  #-win32
394  (:type speed-t "speed_t" nil t)
395  #-win32
396  (:type tcflag-t "tcflag_t" nil t)
397  (:integer nccs "NCCS" nil t)
398  #-win32
399  (:structure alien-termios
400              ("struct termios"
401               (tcflag-t iflag "tcflag_t" "c_iflag")
402               (tcflag-t oflag "tcflag_t" "c_oflag")
403               (tcflag-t cflag "tcflag_t" "c_cflag")
404               (tcflag-t lflag "tcflag_t" "c_lflag")
405               ((array cc-t) cc "cc_t" "c_cc")))
406
407  ;; utime(), utimes()
408  #-win32
409  (:type suseconds-t ; OAOOM warning: similar kludge in tools-for-build
410         #+os-provides-suseconds-t "suseconds_t"
411         #-os-provides-suseconds-t "long")
412
413  #-win32
414  (:structure alien-utimbuf
415              ("struct utimbuf"
416               (time-t actime "time_t" "actime")
417               (time-t modtime "time_t" "modtime")))
418  #-win32
419  (:structure alien-timeval
420              ("struct timeval"
421               (time-t sec "time_t" "tv_sec")
422               (suseconds-t usec "suseconds_t" "tv_usec")))
423
424  (:integer veof "VEOF" nil t)
425  (:integer veol "VEOL" nil t)
426  (:integer verase "VERASE" nil t)
427  (:integer vintr "VINTR" nil t)
428  (:integer vkill "VKILL" nil t)
429  (:integer vmin "VMIN" nil t)
430  (:integer vquit "VQUIT" nil t)
431  (:integer vstart "VSTART" nil t)
432  (:integer vstop "VSTOP" nil t)
433  (:integer vsusp "VSUSP" nil t)
434  (:integer vtime "VTIME" nil t)
435  (:integer vdisable "_POSIX_VDISABLE" nil t)
436
437  (:integer brkint "BRKINT" nil t)
438  (:integer icrnl "ICRNL" nil t)
439  (:integer ignbrk "IGNBRK" nil t)
440  (:integer igncr "IGNCR" nil t)
441  (:integer ignpar "IGNPAR" nil t)
442  (:integer inlcr "INLCR" nil t)
443  (:integer inpck "INPCK" nil t)
444  (:integer istrip "ISTRIP" nil t)
445  #+xsi                               ; FIXME: an extension, apparently
446  (:integer ixany "IXANY" nil t)
447  (:integer ixoff "IXOFF" nil t)
448  (:integer ixon "IXON" nil t)
449  (:integer parmrk "PARMRK" nil t)
450
451  (:integer opost "OPOST" nil t)
452  #+xsi
453  (:integer onlcr "ONLCR" nil t)
454  (:integer ocrnl "OCRNL" nil t)
455  (:integer onocr "ONOCR" nil t)
456  (:integer onlret "ONLRET" nil t)
457  (:integer ofdel "OFDEL" nil t)
458  (:integer ofill "OFILL" nil t)
459  (:integer nldly "NLDLY" nil t)
460  (:integer nl0 "NL0" nil t)
461  (:integer nl1 "NL1" nil t)
462  (:integer crdly "CRDLY" nil t)
463  (:integer cr0 "CR0" nil t)
464  (:integer cr1 "CR1" nil t)
465  (:integer cr2 "CR2" nil t)
466  (:integer cr3 "CR3" nil t)
467  (:integer tabdly "TABDLY" nil t)
468  (:integer tab0 "TAB0" nil t)
469  (:integer tab1 "TAB1" nil t)
470  (:integer tab2 "TAB2" nil t)
471  (:integer tab3 "TAB3" nil t)
472  (:integer bsdly "BSDLY" nil t)
473  (:integer bs0 "BS0" nil t)
474  (:integer bs1 "BS1" nil t)
475  (:integer vtdly "VTDLY" nil t)
476  (:integer vt0 "VT0" nil t)
477  (:integer vt1 "VT1" nil t)
478  (:integer ffdly "FFDLY" nil t)
479  (:integer ff0 "FF0" nil t)
480  (:integer ff1 "FF1" nil t)
481
482  (:integer b0 "B0" nil t)
483  (:integer b50 "B50" nil t)
484  (:integer b75 "B75" nil t)
485  (:integer b110 "B110" nil t)
486  (:integer b134 "B134" nil t)
487  (:integer b150 "B150" nil t)
488  (:integer b200 "B200" nil t)
489  (:integer b300 "B300" nil t)
490  (:integer b600 "B600" nil t)
491  (:integer b1200 "B1200" nil t)
492  (:integer b1800 "B1800" nil t)
493  (:integer b2400 "B2400" nil t)
494  (:integer b4800 "B4800" nil t)
495  (:integer b9600 "B9600" nil t)
496  (:integer b19200 "B19200" nil t)
497  (:integer b38400 "B38400" nil t)
498  (:integer b57600 "B57600" nil t)
499  (:integer b115200 "B115200" nil t)
500  (:integer b230400 "B230400" nil t)
501
502  (:integer csize "CSIZE" nil t)
503  (:integer cs5 "CS5" nil t)
504  (:integer cs6 "CS6" nil t)
505  (:integer cs7 "CS7" nil t)
506  (:integer cs8 "CS8" nil t)
507  (:integer cstopb "CSTOPB" nil t)
508  (:integer cread "CREAD" nil t)
509  (:integer parenb "PARENB" nil t)
510  (:integer parodd "PARODD" nil t)
511  (:integer hupcl "HUPCL" nil t)
512  (:integer clocal "CLOCAL" nil t)
513
514  (:integer echo "ECHO" nil t)
515  (:integer echoe "ECHOE" nil t)
516  (:integer echok "ECHOK" nil t)
517  (:integer echonl "ECHONL" nil t)
518  (:integer icanon "ICANON" nil t)
519  (:integer iexten "IEXTEN" nil t)
520  (:integer isig "ISIG" nil t)
521  (:integer noflsh "NOFLSH" nil t)
522  (:integer tostop "TOSTOP" nil t)
523
524  (:integer tcsanow "TCSANOW" nil t)
525  (:integer tcsadrain "TCSADRAIN" nil t)
526  (:integer tcsaflush "TCSAFLUSH" nil t)
527
528  (:integer tciflush "TCIFLUSH" nil t)
529  (:integer tcioflush "TCIOFLUSH" nil t)
530  (:integer tcoflush "TCOFLUSH" nil t)
531  (:integer tcioff "TCIOFF" nil t)
532  (:integer tcion "TCION" nil t)
533  (:integer tcooff "TCOOFF" nil t)
534  (:integer tcoon "TCOON" nil t)
535
536  ;; syslog -- does this exist at all on Windows?
537
538  ;; SUSv3-standard openlog() facilities
539  #-win32
540  (:integer log-user "LOG_USER" "Default openlog() faclity." t)
541  #-win32
542  (:integer log-local0 "LOG_LOCAL0" "Locally-defined openlog() facility" t)
543  #-win32
544  (:integer log-local1 "LOG_LOCAL1" "Locally-defined openlog() facility" t)
545  #-win32
546  (:integer log-local2 "LOG_LOCAL2" "Locally-defined openlog() facility" t)
547  #-win32
548  (:integer log-local3 "LOG_LOCAL3" "Locally-defined openlog() facility" t)
549  #-win32
550  (:integer log-local4 "LOG_LOCAL4" "Locally-defined openlog() facility" t)
551  #-win32
552  (:integer log-local5 "LOG_LOCAL5" "Locally-defined openlog() facility" t)
553  #-win32
554  (:integer log-local6 "LOG_LOCAL6" "Locally-defined openlog() facility" t)
555  #-win32
556  (:integer log-local7 "LOG_LOCAL7" "Locally-defined openlog() facility" t)
557
558  ;; Additional, non-standard openlog() facilities (most of which
559  ;; probably won't be needed by Lisp programs, but here for
560  ;; completeness).
561  #-(or win32 sunos)
562  (:integer
563   log-authpriv "LOG_AUTHPRIV" "openlog() facility for authorization messages" t)
564  #-win32
565  (:integer
566   log-cron "LOG_CRON" "openlog() facility for cron and at daemons" t)
567  #-win32
568  (:integer
569   log-daemon "LOG_DAEMON" "openlog() facility for arbitrary daemons" t)
570  #-(or win32 sunos)
571  (:integer
572   log-ftp "LOG_FTP" "openlog() facility for FTP daemons" t)
573  #-win32
574  (:integer
575   log-kern "LOG_KERN" "openlog() facility for kernel messages" t)
576  #-win32
577  (:integer
578   log-lpr "LOG_LPR" "openlog() facility for the printer subsystem" t)
579  #-win32
580  (:integer
581   log-mail "LOG_MAIL" "openlog() facility for the mail subsystem" t)
582  #-win32
583  (:integer
584   log-news "LOG_NEWS" "openlog() facility for the usenet subsystem" t)
585  #-win32
586  (:integer
587   log-syslog "LOG_SYSLOG" "openlog() facility for the syslog subsystem" t)
588  #-win32
589  (:integer
590   log-uucp "LOG_UUCP" "openlog() facility for the UUCP subsystem" t)
591
592  ;; openlog() options
593  #-win32
594  (:integer
595   log-pid "LOG_PID"
596   "If supplied to openlog(), log the process ID with each message"
597   t)
598  #-win32
599  (:integer
600   log-cons "LOG_CONS"
601   "If supplied to openlog(), log to the system console as well as logfiles"
602   t)
603  #-win32
604  (:integer
605   log-ndelay "LOG_NDELAY"
606   "If supplied to openlog(), immediately open the syslog connection."
607   t)
608  #-win32
609  (:integer
610   log-odelay "LOG_ODELAY"
611   "If supplied to openlog(), delay opening the syslog connection to the first syslog() call."
612   t)
613  #-win32
614  (:integer
615   log-nowait "LOG_NOWAIT"
616   "If supplied to openlog(), do not wait for child processes created by calls to syslog()."
617   t)
618  ;; Not in SUSv3, but at least Glibc and BSD libc have this
619  #-(or win32 sunos)
620  (:integer
621   log-perror "LOG_PERROR"
622   "If supplied to openlog(), write log messages to the process's standard error descriptor in addition to the logging facility."
623   t)
624
625  ;; syslog() severity levels
626  #-win32
627  (:integer
628   log-emerg "LOG_EMERG" "Log severity level denoting a panic." t)
629  #-win32
630  (:integer
631   log-alert "LOG_ALERT" "Log severity level denoting a condition that should be corrected immediately." t)
632  #-win32
633  (:integer
634   log-crit "LOG_CRIT" "Log severity level denoting critical conditions." t)
635  #-win32
636  (:integer
637   log-err "LOG_ERR" "Log severity level denoting an error." t)
638  #-win32
639  (:integer
640   log-warning "LOG_WARNING" "Log severity level denoting a warning." t)
641  #-win32
642  (:integer
643   log-notice "LOG_NOTICE" "Log severity level denoting non-errors that may require special handling." t)
644  #-win32
645  (:integer
646   log-info "LOG_INFO" "Log severity level denoting informational messages." t)
647  #-win32
648  (:integer
649   log-debug "LOG_DEBUG" "Log severity level denoting debugging information ." t)
650
651 )