+ ("struct dirent"
+ (:c-string name "char *" "d_name"
+ :distrust-length #+sunos t #-sunos nil)) t)
+
+ (:structure alien-stat
+ ("struct stat"
+ (mode-t mode "mode_t" "st_mode")
+ (ino-t ino "ino_t" "st_ino")
+ (dev-t dev "dev_t" "st_dev")
+ (nlink-t nlink "nlink_t" "st_nlink")
+ (uid-t uid "uid_t" "st_uid")
+ (gid-t gid "gid_t" "st_gid")
+ (off-t size "off_t" "st_size")
+ (time-t atime "time_t" "st_atime")
+ (time-t mtime "time_t" "st_mtime")
+ (time-t ctime "time_t" "st_ctime")))
+
+ ;; open()
+ (:integer o-rdonly "O_RDONLY" nil t)
+ (:integer o-wronly "O_WRONLY" nil t)
+ (:integer o-rdwr "O_RDWR" nil t)
+ (:integer o-creat "O_CREAT" nil t)
+ (:integer o-excl "O_EXCL" nil t)
+ (:integer o-noctty "O_NOCTTY" nil t)
+ (:integer o-trunc "O_TRUNC" nil t)
+ (:integer o-append "O_APPEND" nil t)
+ (:integer o-nonblock "O_NONBLOCK" nil t)
+ (:integer o-ndelay "O_NDELAY" nil t)
+ (:integer o-sync "O_SYNC" nil t)
+ (:integer o-nofollow "O_NOFOLLOW" nil t)
+ (:integer o-directory "O_DIRECTORY" nil t)
+ (:integer o-direct "O_DIRECT" nil t)
+ (:integer o-async "O_ASYNC" nil t)
+ (:integer o-largefile "O_LARGEFILE" nil t) ; hmm...
+ (:integer o-dsync "O_DSYNC" nil t)
+ (:integer o-rsync "O_RSYNC" nil t)
+
+ ;; lseek()
+ (:integer seek-set "SEEK_SET" nil t)
+ (:integer seek-cur "SEEK_CUR" nil t)
+ (:integer seek-end "SEEK_END" nil t)
+
+ ;; fcntl()
+ (:integer f-dupfd "F_DUPFD" nil t)
+ (:integer f-getfd "F_GETFD" nil t)
+ (:integer f-setfd "F_SETFD" nil t)
+ (:integer f-getfl "F_GETFL" nil t)
+ (:integer f-setfl "F_SETFL" nil t)
+ (:integer f-getlk "F_GETLK" nil t)
+ (:integer f-setlk "F_SETLK" nil t)
+ (:integer f-setlkw "F_SETLKW" nil t)
+ (:integer f-getown "F_GETOWN" nil t)
+ (:integer f-setown "F_SETOWN" nil t)
+
+ ;; tcgetattr(), tcsetattr()
+ (:type cc-t "cc_t")
+ (:type speed-t "speed_t" nil t)
+ (:type tcflag-t "tcflag_t" nil t)
+ (:integer nccs "NCCS" nil t)
+
+ (:structure alien-termios
+ ("struct termios"
+ (tcflag-t iflag "tcflag_t" "c_iflag")
+ (tcflag-t oflag "tcflag_t" "c_oflag")
+ (tcflag-t cflag "tcflag_t" "c_cflag")
+ (tcflag-t lflag "tcflag_t" "c_lflag")
+ ((array cc-t) cc "cc_t" "c_cc")))
+
+ (:integer veof "VEOF" nil t)
+ (:integer veol "VEOL" nil t)
+ (:integer verase "VERASE" nil t)
+ (:integer vintr "VINTR" nil t)
+ (:integer vkill "VKILL" nil t)
+ (:integer vmin "VMIN" nil t)
+ (:integer vquit "VQUIT" nil t)
+ (:integer vstart "VSTART" nil t)
+ (:integer vstop "VSTOP" nil t)
+ (:integer vsusp "VSUSP" nil t)
+ (:integer vtime "VTIME" nil t)
+
+ (:integer brkint "BRKINT" nil t)
+ (:integer icrnl "ICRNL" nil t)
+ (:integer ignbrk "IGNBRK" nil t)
+ (:integer igncr "IGNCR" nil t)
+ (:integer ignpar "IGNPAR" nil t)
+ (:integer inlcr "INLCR" nil t)
+ (:integer inpck "INPCK" nil t)
+ (:integer istrip "ISTRIP" nil t)
+ #+xsi ; FIXME: an extension, apparently
+ (:integer ixany "IXANY" nil t)
+ (:integer ixoff "IXOFF" nil t)
+ (:integer ixon "IXON" nil t)
+ (:integer parmrk "PARMRK" nil t)
+
+ (:integer opost "OPOST" nil t)
+ #+xsi
+ (:integer onlcr "ONLCR" nil t)
+ (:integer ocrnl "OCRNL" nil t)
+ (:integer onlret "ONLRET" nil t)
+ (:integer ofill "OFILL" nil t)
+ (:integer nldly "NLDLY" nil t)
+ (:integer nl0 "NL0" nil t)
+ (:integer nl1 "NL1" nil t)
+ (:integer crdly "CRDLY" nil t)
+ (:integer cr0 "CR0" nil t)
+ (:integer cr1 "CR1" nil t)
+ (:integer cr2 "CR2" nil t)
+ (:integer cr3 "CR3" nil t)
+ (:integer tabdly "TABDLY" nil t)
+ (:integer tab0 "TAB0" nil t)
+ (:integer tab1 "TAB1" nil t)
+ (:integer tab2 "TAB2" nil t)
+ (:integer tab3 "TAB3" nil t)
+ (:integer bsdly "BSDLY" nil t)
+ (:integer bs0 "BS0" nil t)
+ (:integer bs1 "BS1" nil t)
+ (:integer vtdly "VTDLY" nil t)
+ (:integer vt0 "VT0" nil t)
+ (:integer vt1 "VT1" nil t)
+ (:integer ffdly "FFDLY" nil t)
+ (:integer ff0 "FF0" nil t)
+ (:integer ff1 "FF1" nil t)
+
+ (:integer b0 "B0" nil t)
+ (:integer b50 "B50" nil t)
+ (:integer b75 "B75" nil t)
+ (:integer b110 "B110" nil t)
+ (:integer b134 "B134" nil t)
+ (:integer b150 "B150" nil t)
+ (:integer b200 "B200" nil t)
+ (:integer b300 "B300" nil t)
+ (:integer b600 "B600" nil t)
+ (:integer b1200 "B1200" nil t)
+ (:integer b1800 "B1800" nil t)
+ (:integer b2400 "B2400" nil t)
+ (:integer b4800 "B4800" nil t)
+ (:integer b9600 "B9600" nil t)
+ (:integer b19200 "B19200" nil t)
+ (:integer b38400 "B38400" nil t)
+
+ (:integer csize "CSIZE" nil t)
+ (:integer cs5 "CS5" nil t)
+ (:integer cs6 "CS6" nil t)
+ (:integer cs7 "CS7" nil t)
+ (:integer cs8 "CS8" nil t)
+ (:integer cstopb "CSTOPB" nil t)
+ (:integer cread "CREAD" nil t)
+ (:integer parenb "PARENB" nil t)
+ (:integer parodd "PARODD" nil t)
+ (:integer hupcl "HUPCL" nil t)
+ (:integer clocal "CLOCAL" nil t)
+
+ (:integer echo "ECHO" nil t)
+ (:integer echoe "ECHOE" nil t)
+ (:integer echok "ECHOK" nil t)
+ (:integer echonl "ECHONL" nil t)
+ (:integer icanon "ICANON" nil t)
+ (:integer iexten "IEXTEN" nil t)
+ (:integer isig "ISIG" nil t)
+ (:integer noflsh "NOFLSH" nil t)
+ (:integer tostop "TOSTOP" nil t)
+
+ (:integer tcsanow "TCSANOW" nil t)
+ (:integer tcsadrain "TCSADRAIN" nil t)
+ (:integer tcsaflush "TCSAFLUSH" nil t)
+
+ (:integer tciflush "TCIFLUSH" nil t)
+ (:integer tcioflush "TCIOFLUSH" nil t)
+ (:integer tcoflush "TCOFLUSH" nil t)
+ (:integer tcioff "TCIOFF" nil t)
+ (:integer tcion "TCION" nil t)
+ (:integer tcooff "TCOOFF" nil t)
+ (:integer tcoon "TCOON" nil t)
+