0.8.2.44:
[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  "unistd.h"
9  "sys/stat.h"
10  
11  "sys/socket.h" "sys/un.h" "netinet/in.h" "netinet/in_systm.h"
12  "netinet/ip.h" "net/if.h" "netdb.h" "errno.h" "netinet/tcp.h"
13  "fcntl.h" "sys/mman.h"
14  "dirent.h")
15
16 ;;; then the stuff we're looking for
17 ((:integer af-inet "AF_INET" "IP Protocol family")
18
19  (:type uid-t "uid_t")
20  (:type gid-t "gid_t")
21
22  (:type pid-t "pid_t")
23
24  ;; mode_t
25  (:type mode-t "mode_t")
26  (:integer s-isuid "S_ISUID")
27  (:integer s-isgid "S_ISGID")
28  (:integer s-isvtx "S_ISVTX")
29  (:integer s-irusr "S_IRUSR")
30  (:integer s-iwusr "S_IWUSR")
31  (:integer s-ixusr "S_IXUSR")
32  (:integer s-iread "S_IRUSR")
33  (:integer s-iwrite "S_IWUSR")
34  (:integer s-iexec "S_IXUSR")
35  (:integer s-irgrp "S_IRGRP")
36  (:integer s-iwgrp "S_IWGRP")
37  (:integer s-ixgrp "S_IXGRP")
38  (:integer s-iroth "S_IROTH")
39  (:integer s-iwoth "S_IWOTH")
40  (:integer s-ixoth "S_IXOTH")
41
42  ;; access()
43  (:integer r-ok "R_OK")
44  (:integer w-ok "W_OK")
45  (:integer x-ok "X_OK")
46  (:integer f-ok "F_OK")
47
48  ;; mmap()
49  (:type off-t "off_t")
50  (:integer prot-none "PROT_NONE" "mmap: no protection")
51  (:integer prot-read "PROT_READ" "mmap: read protection")
52  (:integer prot-write "PROT_WRITE" "mmap: write protection")
53  (:integer prot-exec "PROT_EXEC" "mmap: execute protection")
54  (:integer map-shared "MAP_SHARED" "mmap: shared memory")
55  (:integer map-private "MAP_PRIVATE" "mmap: private mapping")
56  (:integer map-fixed "MAP_FIXED" "mmap: map at given location")
57
58  ;; opendir()
59  (:structure dirent
60              ("struct dirent"
61               (:c-string name "char *" "d_name"
62                          :distrust-length #+solaris t #-solaris nil)))
63  )