Newer
Older
;;; -*- Package: UNIX -*-
;;;
;;; **********************************************************************
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.96 2004/07/25 19:32:38 pmai Exp $")
;;;
;;; **********************************************************************
;;;
;;; This file contains the UNIX low-level support.
;;;
(in-package "UNIX")
(use-package "ALIEN")
(use-package "C-CALL")
(use-package "SYSTEM")
(use-package "EXT")
(export '(daddr-t caddr-t ino-t swblk-t size-t time-t dev-t off-t uid-t gid-t
timeval tv-sec tv-usec timezone tz-minuteswest tz-dsttime
itimerval it-interval it-value tchars t-intrc t-quitc t-startc
t-stopc t-eofc t-brkc ltchars t-suspc t-dsuspc t-rprntc t-flushc
t-werasc t-lnextc sgttyb sg-ispeed sg-ospeed sg-erase sg-kill
sg-flags winsize ws-row ws-col ws-xpixel ws-ypixel
direct d-off d-ino d-reclen #-(or linux svr4) d-namlen d-name
stat st-dev st-mode st-nlink st-uid st-gid st-rdev st-size
st-atime st-mtime st-ctime st-blksize st-blocks
s-ifmt s-ifdir s-ifchr s-ifblk s-ifreg s-iflnk s-ifsock
s-isuid s-isgid s-isvtx s-iread s-iwrite s-iexec
ruseage ru-utime ru-stime ru-maxrss ru-ixrss ru-idrss
ru-isrss ru-minflt ru-majflt ru-nswap ru-inblock ru-oublock
ru-msgsnd ru-msgrcv ru-nsignals ru-nvcsw ru-nivcsw
prot_read prot_write prot_exec prot_none
map_shared map_private map_fixed map_anonymous
ms_async ms_sync ms_invalidate
unix-mmap unix-munmap unix-msync
unix-access r_ok w_ok x_ok f_ok unix-chdir unix-chmod setuidexec
setgidexec savetext readown writeown execown readgrp writegrp
execgrp readoth writeoth execoth unix-fchmod unix-chown unix-fchown
unix-getdtablesize unix-close unix-creat unix-dup unix-dup2
unix-fcntl f-dupfd f-getfd f-setfd f-getfl f-setfl f-getown f-setown
fndelay fappend fasync fcreat ftrunc fexcl unix-link unix-lseek
l_set l_incr l_xtnd unix-mkdir unix-open o_rdonly o_wronly o_rdwr
#+(or hpux svr4 bsd linux) o_ndelay
#+(or hpux svr4 bsd linux) o_noctty #+(or hpux svr4 bsd) o_nonblock
o_append o_creat o_trunc o_excl unix-pipe unix-read unix-readlink
unix-rename unix-rmdir unix-fast-select fd-setsize fd-set fd-clr
fd-isset fd-zero unix-select unix-sync unix-fsync unix-truncate
unix-ftruncate unix-symlink
#+(and sparc svr4) unix-times
unix-unlink unix-write unix-ioctl
tcsetpgrp tcgetpgrp tty-process-group
terminal-speeds tty-raw tty-crmod tty-echo tty-lcase
#+(or hpux svr4 linux bsd) termios
#+(or hpux svr4 linux bsd) c-lflag
#+(or hpux svr4 linux bsd) c-iflag
#+(or hpux svr4 linux bsd) c-oflag
#+(or hpux svr4 linux bsd) tty-icrnl
#+(or hpux svr4 bsd) vdsusp #+(or hpux svr4 linux bsd) veof
#+(or hpux svr4 linux bsd) vintr
#+(or hpux svr4 linux bsd) vquit
#+(or hpux svr4 linux bsd) vstart
#+(or hpux svr4 linux bsd) vstop
#+(or hpux svr4 linux bsd) vsusp
#+(or hpux svr4 linux bsd) c-cflag
#+(or hpux svr4 linux bsd) c-cc
#+(or bsd osf1) c-ispeed
#+(or bsd osf1) c-ospeed
#+(or hpux svr4 linux bsd) tty-icanon
#+(or hpux svr4 linux bsd) vmin
#+(or hpux svr4 linux bsd) vtime
#+(or hpux svr4 linux bsd) tty-ixon
#+(or hpux svr4 linux bsd) tcsanow
#+(or hpux svr4 linux bsd) tcsadrain
#+(or hpux svr4 linux bsd) tciflush
#+(or hpux svr4 linux bsd) tcoflush
#+(or hpux svr4 linux bsd) tcioflush
#+(or hpux svr4 linux bsd) tcsaflush
#+(or hpux svr4 linux bsd) unix-tcgetattr
#+(or hpux svr4 linux bsd) unix-tcsetattr
#+(or hpux svr4 bsd) unix-cfgetospeed
#+(or hpux svr4 bsd) unix-cfsetospeed
#+(or hpux svr4 bsd) unix-cfgetispeed
#+(or hpux svr4 bsd) unix-cfsetispeed
#+(or hpux svr4 linux bsd) tty-ignbrk
#+(or hpux svr4 linux bsd) tty-brkint
#+(or hpux svr4 linux bsd) tty-ignpar
#+(or hpux svr4 linux bsd) tty-parmrk
#+(or hpux svr4 linux bsd) tty-inpck
#+(or hpux svr4 linux bsd) tty-istrip
#+(or hpux svr4 linux bsd) tty-inlcr
#+(or hpux svr4 linux bsd) tty-igncr
#+(or hpux svr4 linux bsd) tty-ixany
#+(or hpux svr4 linux bsd) tty-ixoff
#+(or hpux irix solaris linux bsd) tty-imaxbel
#+(or hpux svr4 linux bsd) tty-opost
#+(or hpux svr4 linux bsd) tty-onlcr
#+(or hpux svr4 linux) tty-onocr
#+(or hpux svr4 linux) tty-onlret
#+(or hpux svr4 linux) tty-ofill
#+(or hpux svr4 linux) tty-ofdel
#+(or hpux svr4 linux bsd) tty-isig
#+(or hpux svr4 linux bsd) tty-echoe
#+(or hpux svr4 linux bsd) tty-echok
#+(or hpux svr4 linux bsd) tty-echonl
#+(or hpux svr4 linux bsd) tty-noflsh
#+(or hpux svr4 linux bsd) tty-iexten
#+(or hpux svr4 linux bsd) tty-tostop
#+(or hpux irix solaris linux bsd) tty-echoctl
#+(or hpux irix solaris linux bsd) tty-echoprt
#+(or hpux irix solaris linux bsd) tty-echoke
#+(or hpux irix solaris bsd) tty-flusho
#+(or hpux irix solaris linux bsd) tty-pendin
#+(or hpux svr4 linux bsd) tty-cstopb
#+(or hpux svr4 linux bsd) tty-cread
#+(or hpux svr4 linux bsd) tty-parenb
#+(or hpux svr4 linux bsd) tty-parodd
#+(or hpux svr4 linux bsd) tty-hupcl
#+(or hpux svr4 linux bsd) tty-clocal
#+(or irix solaris) rcv1en
#+(or irix solaris) xmt1en
#+(or hpux irix solaris) tty-loblk
#+(or hpux svr4 linux bsd) vintr
#+(or hpux svr4 linux bsd) verase
#+(or hpux svr4 linux bsd) vkill
#+(or hpux svr4 linux bsd) veol
#+(or hpux irix solaris linux bsd) veol2
#+(or hpux svr4 bsd) tty-csize #+(or hpux svr4 bsd) tty-cs5
#+(or hpux svr4 bsd) tty-cs6 #+(or hpux svr4 bsd) tty-cs7
#+(or hpux svr4 bsd) tty-cs8
#+(or hpux svr4 bsd) unix-tcsendbreak
#+(or hpux svr4 bsd) unix-tcdrain
#+(or hpux svr4 bsd) unix-tcflush
#+(or hpux svr4 bsd) unix-tcflow
TIOCGETP TIOCSETP TIOCFLUSH TIOCSETC TIOCGETC TIOCSLTC
KBDSCLICK FIONREAD #+(or hpux bsd) siocspgrp
unix-exit unix-stat unix-lstat unix-fstat
unix-getrusage unix-fast-getrusage rusage_self rusage_children
unix-gettimeofday
#-hpux unix-utimes #-(or svr4 hpux) unix-setreuid
#-(or svr4 hpux) unix-setregid
unix-getpid unix-getppid
#+(or svr4 bsd)unix-setpgid
unix-getgid unix-getegid unix-getpgrp unix-setpgrp unix-getuid
unix-getpagesize unix-gethostname unix-gethostid unix-fork
unix-current-directory unix-isatty unix-ttyname unix-execve
unix-socket unix-connect unix-bind unix-listen unix-accept
unix-recv unix-send unix-getpeername unix-getsockname
unix-getsockopt unix-setsockopt
unix-getpwnam unix-getpwuid unix-getgrnam unix-getgrgid
user-info user-info-name user-info-password user-info-uid
user-info-gid user-info-gecos user-info-dir user-info-shell
group-info group-info-name group-info-gid group-info-members))
(pushnew :unix *features*)
;;;; Common machine independent structures.
;;; From sys/types.h
(def-alien-type int64-t (signed 64))
(def-alien-type u-int64-t (unsigned 64))
(def-alien-type daddr-t
#-(or linux alpha) long
#+(or linux alpha) int)
(def-alien-type ino-t
#-alpha unsigned-long
#+alpha unsigned-int)
(def-alien-type size-t
#-(or linux alpha) long
Loading
Loading full blame...