8 ** Extra stuff in some unixen, not in posix.
11 /*@unchecked@*/ int signgam;
13 typedef /*@integraltype@*/ clockid_t;
15 extern void bcopy (char *b1, /*@out@*/ char *b2, int length)
16 /*@modifies *b2@*/ ; /* Yes, the second parameter is the out param! */
18 extern int /*@alt lltX_bool@*/ bcmp (char *b1, char *b2, int length) /*@*/ ;
19 /* Return value is NOT like strcmp! */
21 extern void bzero (/*@out@*/ char *b1, int length) /*@modifies *b1@*/ ;
22 extern int ffs (int i) /*@*/ ;
23 extern int symlink (char *name1, char *name2) /*@modifies fileSystem@*/ ;
26 setvbuf_unlocked (FILE *stream, /*@null@*/ /*@exposed@*/ char *buf,
27 int mode, size_t size)
28 /*@modifies internalState@*/ ;
31 setbuffer (FILE *stream, /*@null@*/ /*@exposed@*/ char *buf, int size)
32 /*@modifies internalState@*/ ;
34 extern void setlinebuf (FILE *stream) /*@modifies internalState@*/ ;
36 extern int strerror_r (int errnum, /*@out@*/ char *strerrbuf, int buflen)
37 /*@modifies strerrbuf@*/ ;
40 fread_unlocked (/*@out@*/ void *ptr, size_t size, size_t nitems,
42 /*@modifies *stream, *ptr;@*/ ;
45 fwrite_unlocked (void *pointer, size_t size, size_t num_items, FILE *stream)
46 /*@modifies *stream;@*/ ;
48 extern void funlockfile (FILE *file) /*@modifies *file;@*/ ;
49 extern void flockfile (FILE *file) /*@modifies *file@*/ ;
51 extern void /*@alt void * @*/
52 memccpy (/*@returned@*/ /*@out@*/ void *s1,
53 /*@unique@*/ void *s2, int c, size_t n)
56 extern int strcasecmp (char *s1, char *s2) /*@*/ ;
57 extern int strncasecmp (char *s1, char *s2, int n) /*@*/ ;
58 extern char *strdup (char *s) /*@*/ ;
60 extern /*@null@*/ char *tempnam (char *dir, /*@null@*/ char *pfx)
61 /*@modifies internalState@*/ ;
63 extern /*@null@*/ /*@dependent@*/ char *
64 index (/*@returned@*/ char *s, char c) /*@*/ ;
66 extern /*@null@*/ /*@dependent@*/ char *
67 rindex (/*@returned@*/ char *s, char c) /*@*/ ;
69 extern /*@dependent@*/ /*@null@*/ FILE *popen (char *command, char *ttype)
70 /*@modifies fileSystem, errno@*/ ;
71 extern int pclose (FILE *stream) /*@modifies fileSystem, *stream, errno@*/ ;
73 extern double cbrt (double x) /*@modifies errno@*/ ;
74 extern double rint (double x) /*@*/ ;
75 extern double trunc (double x) /*@*/ ;
77 /*@constant int ENOTBLK@*/
78 /*@constant int ETXTBSY@*/
79 /*@constant int EWOULDBLOCK@*/
80 /*@constant int EINPROGRESS@*/
81 /*@constant int EALREADY@*/
82 /*@constant int ENOTSOCK@*/
83 /*@constant int EDESTADDRREQ@*/
84 /*@constant int EMSGSIZE@*/
85 /*@constant int EPROTOTYPE@*/
86 /*@constant int ENOPROTOOPT@*/
87 /*@constant int EPROTONOSUPPORT@*/
88 /*@constant int ESOCKTNOSUPPORT@*/
89 /*@constant int EOPNOTSUPP@*/
90 /*@constant int EPFNOSUPPORT@*/
91 /*@constant int EAFNOSUPPORT@*/
92 /*@constant int EADDRINUSE@*/
93 /*@constant int EADDRNOTAVAIL@*/
94 /*@constant int ENETDOWN@*/
95 /*@constant int ENETUNREACH@*/
96 /*@constant int ENETRESET@*/
97 /*@constant int ECONNABORTED@*/
98 /*@constant int ECONNRESET@*/
99 /*@constant int ENOBUFS@*/
100 /*@constant int EISCONN@*/
101 /*@constant int ENOTCONN@*/
102 /*@constant int ESHUTDOWN@*/
103 /*@constant int ETOOMANYREFS@*/
104 /*@constant int ETIMEDOUT@*/
105 /*@constant int ECONNREFUSED@*/
106 /*@constant int ENAMETOOLONG@*/
107 /*@constant int EHOSTDOWN@*/
108 /*@constant int EHOSTUNREACH@*/
109 /*@constant int ENOTEMPTY@*/
110 /*@constant int EPROCLIM@*/
111 /*@constant int EUSERS@*/
112 /*@constant int EDQUOT@*/
113 /*@constant int ESTALE@*/
114 /*@constant int EREMOTE@*/
115 /*@constant int ENOMSG@*/
116 /*@constant int EIDRM@*/
117 /*@constant int EALIGN@*/
118 /*@constant int EDEADLK@*/
119 /*@constant int ENOLCK@*/
120 /*@constant int ENOSYS@*/
121 /*@constant int EACTIVE@*/
122 /*@constant int ENOACTIVE@*/
123 /*@constant int ENORESOURCES@*/
124 /*@constant int ENOSYSTEM@*/
125 /*@constant int ENODUST@*/
126 /*@constant int EDUPNOCONN@*/
127 /*@constant int EDUPNODISCONN@*/
128 /*@constant int EDUPNOTCNTD@*/
129 /*@constant int EDUPNOTIDLE@*/
130 /*@constant int EDUPNOTWAIT@*/
131 /*@constant int EDUPNOTRUN@*/
132 /*@constant int EDUPBADOPCODE@*/
133 /*@constant int EDUPINTRANSIT@*/
134 /*@constant int EDUPTOOMANYCPUS@*/
135 /*@constant int ELOOP@*/
137 /*@constant int LOCK_MAX@*/
138 /*@constant int FCHR_MAX@*/
139 /*@constant int USI_MAX@*/
140 /*@constant int WORD_BIT@*/
141 /*@constant int LONG_BIT@*/
142 /*@constant long NAME_MAX@*/
143 /*@constant long NGROUPS_MAX@*/
144 /*@constant long MAX_INPUT@*/
145 /*@constant long MAX_CANON@*/
146 /*@constant int MAX_CHAR@*/
147 /*@constant long OPEN_MAX@*/
148 /*@constant int PASS_MAX@*/
149 /*@constant int PATH_MAX@*/
150 /*@constant int PID_MAX@*/
151 /*@constant int SYSPID_MAX@*/
152 /*@constant long PIPE_BUF@*/
153 /*@constant int PIPE_MAX@*/
154 /*@constant int PROC_MAX@*/
155 /*@constant int STD_BLK@*/
156 /*@constant int SYS_NMLN@*/
157 /*@constant int SYS_OPEN@*/
158 /*@constant int NZERO@*/
159 /*@constant int UID_MAX@*/
160 /*@constant long MB_LEN_MAX@*/
161 /*@constant int NL_ARGMAX@*/
162 /*@constant int NL_MSGMAX@*/
163 /*@constant int NL_NMAX@*/
164 /*@constant int NL_SETMAX@*/
165 /*@constant int NL_TEXTMAX@*/
166 /*@constant int NL_LBLMAX@*/
167 /*@constant int NL_LANGMAX @*/
169 /*@constant double M_E@*/
170 /*@constant double M_LOG2E@*/
171 /*@constant double M_LOG10E@*/
172 /*@constant double M_LN2@*/
173 /*@constant double M_LN10@*/
174 /*@constant double M_PI@*/
175 /*@constant double M_PI_2@*/
176 /*@constant double M_PI_4@*/
177 /*@constant double M_1_PI@*/
178 /*@constant double M_2_PI@*/
179 /*@constant double M_2_SQRTPI@*/
180 /*@constant double M_SQRT2@*/
181 /*@constant double M_SQRT1_2@*/
183 /*@constant double MAXFLOAT@*/
184 /*@constant double HUGE@*/
186 /*@constant int DOMAIN@*/
187 /*@constant int SING@*/
188 /*@constant int OVERFLOW@*/
189 /*@constant int UNDERFLOW@*/
190 /*@constant int TLOSS@*/
191 /*@constant int PLOSS@*/
193 extern /*@unchecked@*/ int daylight;
194 extern /*@unchecked@*/ long timezone;
195 extern /*@unchecked@*/ char *tzname[];
198 extern void tzset(void) /*@modifies daylight, timezone, tzname@*/ ;
201 typedef unsigned char uchar_t;
202 typedef unsigned short ushort_t;
203 typedef unsigned int uint_t;
204 typedef unsigned long ulong_t;
205 typedef volatile unsigned char vuchar_t;
206 typedef volatile unsigned short vushort_t;
207 typedef volatile unsigned int vuint_t;
208 typedef volatile unsigned long vulong_t;
209 typedef long label_t;
211 typedef /*@integraltype@*/ daddr_t;
212 typedef char *caddr_t;
213 typedef long *qaddr_t;
214 typedef char *addr_t;
215 typedef long physadr_t;
218 typedef unsigned long rlim_t;
220 typedef /*@integraltype@*/ key_t;
222 typedef char slab_t[12];
223 typedef ulong_t shmatt_t;
224 typedef ulong_t msgqnum_t;
225 typedef ulong_t msglen_t;
226 typedef long timer_t;
227 typedef uchar_t uchar;
228 typedef ushort_t ushort;
230 typedef ulong_t ulong;
231 typedef uchar_t u_char;
232 typedef ushort_t u_short;
233 typedef uint_t u_int;
234 typedef ulong_t u_long;
235 typedef vuchar_t vu_char;
236 typedef vushort_t vu_short;
237 typedef vuint_t vu_int;
238 typedef vulong_t vu_long;
239 typedef long swblk_t;
240 typedef u_long fixpt_t;
241 typedef long segsz_t;
242 typedef /*@abstract@*/ fd_set;
244 int ttyname_r (int fg, /*@out@*/ char *buffer, int len) /*@modifies buffer@*/ ;
245 int ioctl (int d, int /*@alt long@*/ request, /*@out@*/ void *arg)
246 /*@modifies *arg, errno@*/ ; /* depends on request! */
248 int gethostname (/*@out@*/ char *address, int address_len)
249 /*@modifies address@*/ ;
251 pid_t vfork (void) /*@modifies fileSystem@*/ ;
259 /*@constant int UIO_MAXIOV@*/ /* BSD */
260 /*@constant int IOV_MAX@*/ /* supposedly SVR4 */
263 readv (int fd, const struct iovec iov[], int iovcnt)
264 /*@modifies iov[].iov_base, fileSystem, errno@*/;
267 writev (int fd, const struct iovec iov[], int iovcnt)
268 /*@modifies errno@*/;
270 /*________________________________________________________________________
280 /*@constant short POLLIN@*/
281 /*@constant short POLLRDNORM@*/
282 /*@constant short POLLRDBAND@*/
283 /*@constant short POLLPRI@*/
284 /*@constant short POLLOUT@*/
285 /*@constant short POLLWRNORM@*/
286 /*@constant short POLLWRBAND@*/
287 /*@constant short POLLERR@*/
288 /*@constant short POLLHUP@*/
289 /*@constant short POLLNVAL@*/
291 extern int poll (struct poll pollfd[], unsigned long nfds, int timeout)
292 /*@modifies pollfd[].revents, errno@*/ ;
295 ** free does not take null
299 extern void free (/*@notnull@*/ /*@out@*/ /*@only@*/ void *p) /*@modifies *p@*/ ;
302 /*________________________________________________________________________
306 /*@constant int SOCK_STREAM@*/
307 /*@constant int SOCK_DGRAM@*/
308 /*@constant int SOCK_RAW@*/
309 /*@constant int SOCK_RDM@*/
310 /*@constant int SOCK_SEQPACKET@*/
311 /*@constant int SO_DEBUG@*/
312 /*@constant int SO_ACCEPTCONN@*/
313 /*@constant int SO_REUSEADDR@*/
314 /*@constant int SO_KEEPALIVE@*/
315 /*@constant int SO_DONTROUTE@*/
316 /*@constant int SO_BROADCAST@*/
317 /*@constant int SO_USELOOPBACK@*/
318 /*@constant int SO_LINGER@*/
319 /*@constant int SO_OOBINLINE@*/
320 /*@constant int SO_REUSEPORT@*/
321 /*@constant int SO_SNDBUF@*/
322 /*@constant int SO_RCVBUF@*/
323 /*@constant int SO_SNDLOWAT@*/
324 /*@constant int SO_RCVLOWAT@*/
325 /*@constant int SO_SNDTIMEO@*/
326 /*@constant int SO_RCVTIMEO@*/
327 /*@constant int SO_ERROR@*/
328 /*@constant int SO_TYPE@*/
329 /*@constant int SOL_SOCKET@*/
330 /*@constant int AF_UNSPEC@*/
331 /*@constant int AF_LOCAL@*/
332 /*@constant int AF_UNIX@*/
333 /*@constant int AF_INET@*/
334 /*@constant int AF_IMPLINK@*/
335 /*@constant int AF_PUP@*/
336 /*@constant int AF_CHAOS@*/
337 /*@constant int AF_NS@*/
338 /*@constant int AF_ISO@*/
339 /*@constant int AF_OSI@*/
340 /*@constant int AF_ECMA@*/
341 /*@constant int AF_DATAKIT@*/
342 /*@constant int AF_CCITT@*/
343 /*@constant int AF_SNA@*/
344 /*@constant int AF_DECnet@*/
345 /*@constant int AF_DLI@*/
346 /*@constant int AF_LAT@*/
347 /*@constant int AF_HYLINK@*/
348 /*@constant int AF_APPLETALK@*/
349 /*@constant int AF_ROUTE@*/
350 /*@constant int AF_LINK@*/
351 /*@constant int pseudo_AF_XTP@*/
352 /*@constant int AF_COIP@*/
353 /*@constant int AF_CNT@*/
354 /*@constant int pseudo_AF_RTIP@*/
355 /*@constant int AF_IPX@*/
356 /*@constant int AF_SIP@*/
357 /*@constant int pseudo_AF_PIP@*/
358 /*@constant int AF_ISDN@*/
359 /*@constant int AF_E164@*/
360 /*@constant int AF_MAX@*/
361 /*@constant int MSG_OOB@*/
362 /*@constant int MSG_PEEK@*/
363 /*@constant int MSG_DONTROUTE@*/
364 /*@constant int MSG_EOR@*/
365 /*@constant int MSG_TRUNC@*/
366 /*@constant int MSG_CTRUNC@*/
367 /*@constant int MSG_WAITALL@*/
368 /*@constant int MSG_DONTWAIT@*/
369 /*@constant int MSG_EOF@*/
370 /*@constant int MSG_COMPAT@*/
371 /*@constant int PF_UNSPEC@*/
372 /*@constant int PF_LOCAL@*/
373 /*@constant int PF_UNIX@*/
374 /*@constant int PF_INET@*/
375 /*@constant int PF_IMPLINK@*/
376 /*@constant int PF_PUP@*/
377 /*@constant int PF_CHAOS@*/
378 /*@constant int PF_NS@*/
379 /*@constant int PF_ISO@*/
380 /*@constant int PF_OSI@*/
381 /*@constant int PF_ECMA@*/
382 /*@constant int PF_DATAKIT@*/
383 /*@constant int PF_CCITT@*/
384 /*@constant int PF_SNA@*/
385 /*@constant int PF_DECnet@*/
386 /*@constant int PF_DLI@*/
387 /*@constant int PF_LAT@*/
388 /*@constant int PF_HYLINK@*/
389 /*@constant int PF_APPLETALK@*/
390 /*@constant int PF_ROUTE@*/
391 /*@constant int PF_LINK@*/
392 /*@constant int PF_XTP@*/
393 /*@constant int PF_COIP@*/
394 /*@constant int PF_CNT@*/
395 /*@constant int PF_SIP@*/
396 /*@constant int PF_IPX@*/
397 /*@constant int PF_RTIP@*/
398 /*@constant int PF_PIP@*/
399 /*@constant int PF_ISDN@*/
400 /*@constant int PF_MAX@*/
401 /*@constant int NET_MAXID@*/
402 /*@constant int NET_RT_DUMP@*/
403 /*@constant int NET_RT_FLAGS@*/
404 /*@constant int NET_RT_IFLIST@*/
405 /*@constant int NET_RT_MAXID@*/
406 /*@constant int SOMAXCONN@*/
407 /*@constant int SCM_RIGHTS@*/
410 u_char sa_len; /* total length */
411 u_char sa_family; /* address family */
412 char sa_data[14]; /* actually longer; address value */
416 int l_onoff; /* option on/off */
417 int l_linger; /* linger time */
421 u_short sp_family; /* address family */
422 u_short sp_protocol; /* protocol */
425 caddr_t msg_name; /* optional address */
426 u_int msg_namelen; /* size of address */
427 struct iovec *msg_iov; /* scatter/gather array */
428 u_int msg_iovlen; /* # elements in msg_iov */
429 caddr_t msg_control; /* ancillary data, see below */
430 u_int msg_controllen; /* ancillary data buffer len */
431 int msg_flags; /* flags on received message */
435 u_int cmsg_len; /* data byte count, including hdr */
436 int cmsg_level; /* originating protocol */
437 int cmsg_type; /* protocol-specific type */
438 /* followed by u_char cmsg_data[]; */
442 accept (int s, struct sockaddr *addr, int *addrlen)
443 /*@modifies *addrlen, errno@*/;
446 bind (int s, struct sockaddr *name, int namelen)
447 /*@modifies errno, fileSystem@*/;
450 connect (int s, struct sockaddr *name, int namelen)
451 /*@modifies errno, internalState@*/;
454 getpeername (int s, /*@out@*/ struct sockaddr *name, int *namelen)
455 /*@modifies *name, *namelen, errno@*/;
458 getsockname (int s, struct sockaddr *name, int *namelen)
459 /*@modifies *name, *namelen, errno@*/;
462 getsockopt (int s, int level, int optname, /*@out@*/ void *optval, int *optlen)
463 /*@modifies *optval, *optlen, errno@*/;
466 listen (int s, int backlog)
467 /*@modifies errno, internalState@*/;
470 recv (int s, /*@out@*/ void *buf, size_t len, int flags)
471 /*@modifies *buf, errno@*/;
474 recvfrom (int s, void *buf, size_t len, int flags, /*@null@*/ struct sockaddr *from, int *fromlen)
475 /*@modifies *buf, *from, *fromlen, errno@*/;
478 recvmsg (int s, struct msghdr *msg, int flags)
479 /*@modifies msg->msg_iov->iov_base[], errno@*/;
482 send (int s, const void *msg, size_t len, int flags)
483 /*@modifies errno@*/;
486 sendto (int s, const void *msg, size_t len, int flags, const struct sockaddr *to, int tolen)
487 /*@modifies errno@*/;
490 sendmsg (int s, const struct msghdr *msg, int flags)
491 /*@modifies errno@*/;
494 setsockopt (int s, int level, int optname, const void *optval, int optlen)
495 /*@modifies internalState, errno@*/;
498 shutdown (int s, int how)
499 /*@modifies errno@*/;
502 socket (int domain, int type, int protocol)
503 /*@modifies errno@*/;
506 socketpair (int d, int type, int protocol, /*@out@*/ int *sv)
507 /*@modifies errno@*/;
509 /*@constant int BADSIG@*/
510 /*@constant int SA_ONSTACK@*/
511 /*@constant int SA_RESTART@*/
512 /*@constant int SA_DISABLE@*/
513 /*@constant int SIGBUS@*/
514 /*@constant int SIGEMT@*/
515 /*@constant int SIGINFO@*/
516 /*@constant int SIGIO@*/
517 /*@constant int SIGIOT@*/
518 /*@constant int SIGPOLL@*/
519 /*@constant int SIGPROF@*/
520 /*@constant int SIGPWR@*/
521 /*@constant int SIGSYS@*/
522 /*@constant int SIGTRAP@*/
523 /*@constant int SIGURG@*/
524 /*@constant int SIGVTALRM@*/
525 /*@constant int SIGWINCH@*/
526 /*@constant int SIGXCPU@*/
527 /*@constant int SIGXFSZ@*/
529 extern void psignal (int sig, const char *msg)
530 /*@modifies fileSystem@*/;
532 /*@unchecked@*/ extern char *optarg;
533 /*@unchecked@*/ extern int optind;
534 /*@unchecked@*/ extern int optopt;
535 /*@unchecked@*/ extern int opterr;
536 /*@unchecked@*/ extern int optreset;
539 getopt (int argc, char * const *argv, const char *optstring)
540 /*@globals optarg, optind, optopt, opterr, optreset@*/
541 /*@modifies optarg, optind, optopt@*/;
544 setenv (const char *name, const char *value, int overwrite)
545 /*@globals environ@*/
546 /*@modifies *environ, errno@*/;
549 putenv (const char *string)
550 /*@globals environ@*/
551 /*@modifies *environ, errno@*/;
554 unsetenv (const char *name)
555 /*@globals environ@*/
556 /*@modifies *environ@*/;
558 /*________________________________________________________________________
567 W_EXITCODE (int ret, int sig)
574 /*@constant int WAIT_ANY@*/
575 /*@constant int WAIT_MYPGRP@*/
576 /*@constant int WSTOPPED@*/
579 wait3 (int *statloc, int options, /*@null@*/ /*@out@*/ struct rusage *rusage)
580 /*@modifies *statloc, *rusage, errno@*/;
583 wait4 (pid_t p, int *statloc, int opt, /*@null@*/ /*@out@*/ struct rusage *r)
584 /*@modifies *statloc, *r, errno@*/;
601 /*@constant int DST_NONE@*/
602 /*@constant int DST_USA@*/
603 /*@constant int DST_AUST@*/
604 /*@constant int DST_WET@*/
605 /*@constant int DST_MET@*/
606 /*@constant int DST_EET@*/
607 /*@constant int DST_CAN@*/
609 /*@constant int ITIMER_PROF@*/
610 /*@constant int ITIMER_REAL@*/
611 /*@constant int ITIMER_VIRTUAL@*/
614 struct timeval it_interval;
615 struct timeval it_value;
626 adjtime (const struct timeval *delta, /*@null@*/ /*@out@*/ struct timeval *olddelta)
627 /*@modifies internalState, *olddelta, errno@*/;
630 getitimer (int which, /*@out@*/ struct itimerval *value)
631 /*@modifies errno, *value*/;
634 gettimeofday (/*@null@*/ /*@out@*/ struct timeval *tp, /*@null@*/ /*@out@*/ struct timezone *tzp)
635 /*@modifies *tp, *tzp, errno@*/;
638 setitimer (int which, struct itimerval *val, /*@null@*/ /*@out@*/ struct itimerval *oval)
639 /*@modifies *oval, errno, internalState*/;
642 settimeofday (const struct timeval *t, const struct timezone *z)
643 /*@modifies internalState, errno@*/;
646 utimes (const char *file, /*@null@*/ const struct timeval *times)
647 /*@modifies fileSystem, errno*/;
649 /*________________________________________________________________________
653 /*@constant int PROT_READ@*/
654 /*@constant int PROT_WRITE@*/
655 /*@constant int PROT_EXEC@*/
656 /*@constant int MAP_SHARED@*/
657 /*@constant int MAP_PRIVATE@*/
658 /*@constant int MAP_COPY@*/
659 /*@constant int MAP_FIXED@*/
660 /*@constant int MAP_RENAME@*/
661 /*@constant int MAP_NORESERVE@*/
662 /*@constant int MAP_INHERIT@*/
663 /*@constant int MAP_NOEXTEND@*/
664 /*@constant int MAP_HASSEMAPHORE@*/
665 /*@constant int MS_ASYNC@*/
666 /*@constant int MS_INVALIDATE@*/
667 /*@constant int MAP_FILE@*/
668 /*@constant int MAP_ANON@*/
669 /*@constant int MADV_NORMAL@*/
670 /*@constant int MADV_RANDOM@*/
671 /*@constant int MADV_SEQUENTIAL@*/
672 /*@constant int MADV_WILLNEED@*/
673 /*@constant int MADV_DONTNEED@*/
676 mmap (/*@null@*/ /*@returned@*/ caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
680 madvise (caddr_t addr, int len, int behav)
684 mprotect (caddr_t addr, int len, int prot)
688 munmap (caddr_t addr, size_t len)
692 msync (caddr_t addr, int len, int flags)
696 mlock (caddr_t addr, size_t len)
700 munlock (caddr_t addr, size_t len)
704 /*________________________________________________________________________
709 unsigned short ws_row;
710 unsigned short ws_col;
711 unsigned short ws_xpixel;
712 unsigned short ws_ypixel;
715 /*@constant int TIOCMODG@*/
716 /*@constant int TIOCMODS@*/
717 /*@constant int TIOCM_LE@*/
718 /*@constant int TIOCM_DTR@*/
719 /*@constant int TIOCM_RTS@*/
720 /*@constant int TIOCM_ST@*/
721 /*@constant int TIOCM_SR@*/
722 /*@constant int TIOCM_CTS@*/
723 /*@constant int TIOCM_CAR@*/
724 /*@constant int TIOCM_CD@*/
725 /*@constant int TIOCM_RNG@*/
726 /*@constant int TIOCM_RI@*/
727 /*@constant int TIOCM_DSR@*/
728 /*@constant int TIOCEXCL@*/
729 /*@constant int TIOCNXCL@*/
730 /*@constant int TIOCFLUSH@*/
731 /*@constant int TIOCGETA@*/
732 /*@constant int TIOCSETA@*/
733 /*@constant int TIOCSETAW@*/
734 /*@constant int TIOCSETAF@*/
735 /*@constant int TIOCGETD@*/
736 /*@constant int TIOCSETD@*/
737 /*@constant int TIOCSBRK@*/
738 /*@constant int TIOCCBRK@*/
739 /*@constant int TIOCSDTR@*/
740 /*@constant int TIOCCDTR@*/
741 /*@constant int TIOCGPGRP@*/
742 /*@constant int TIOCSPGRP@*/
743 /*@constant int TIOCOUTQ@*/
744 /*@constant int TIOCSTI@*/
745 /*@constant int TIOCNOTTY@*/
746 /*@constant int TIOCPKT@*/
747 /*@constant int TIOCPKT_DATA@*/
748 /*@constant int TIOCPKT_FLUSHREAD@*/
749 /*@constant int TIOCPKT_FLUSHWRITE@*/
750 /*@constant int TIOCPKT_STOP@*/
751 /*@constant int TIOCPKT_START@*/
752 /*@constant int TIOCPKT_NOSTOP@*/
753 /*@constant int TIOCPKT_DOSTOP@*/
754 /*@constant int TIOCPKT_IOCTL@*/
755 /*@constant int TIOCSTOP@*/
756 /*@constant int TIOCSTART@*/
757 /*@constant int TIOCMSET@*/
758 /*@constant int TIOCMBIS@*/
759 /*@constant int TIOCMBIC@*/
760 /*@constant int TIOCMGET@*/
761 /*@constant int TIOCREMOTE@*/
762 /*@constant int TIOCGWINSZ@*/
763 /*@constant int TIOCSWINSZ@*/
764 /*@constant int TIOCUCNTL@*/
765 /*@constant int TIOCSTAT@*/
766 /*@constant int TIOCCONS@*/
767 /*@constant int TIOCSCTTY@*/
768 /*@constant int TIOCEXT@*/
769 /*@constant int TIOCSIG@*/
770 /*@constant int TIOCDRAIN@*/
771 /*@constant int TIOCMSDTRWAIT@*/
772 /*@constant int TIOCMGDTRWAIT@*/
773 /*@constant int TIOCTIMESTAMP@*/
774 /*@constant int TIOCSDRAINWAIT@*/
775 /*@constant int TIOCGDRAINWAIT@*/
776 /*@constant int TTYDISC@*/
777 /*@constant int TABLDISC@*/
778 /*@constant int SLIPDISC@*/
779 /*@constant int PPPDISC@*/
781 /*@constant int MAXHOSTNAMELEN@*/
784 FD_CLR (int n, fd_set *p)
788 FD_COPY (fd_set *f, /*@out@*/ fd_set *t)
791 extern int /*@alt lltX_bool@*/
792 FD_ISSET (int n, fd_set *p)
796 FD_SET (int n, fd_set *p)
800 FD_ZERO (fd_set /*@out@*/ *p)
805 /*@modifies internalState, errno@*/;
808 fchown (int fd, uid_t owner, gid_t group)
809 /*@modifies errno, fileSystem@*/;
813 /*@modifies errno, fileSystem@*/;
816 ftruncate (int fd, off_t length)
817 /*@modifies errno, fileSystem@*/;
820 gethostname (/*@out@*/ char *name, int namlen)
821 /*@modifies *name@*/;
824 initgroups (const char *name, int basegid)
825 /*@modifies internalState@*/;
828 lchown (const char *path, uid_t owner, gid_t group)
829 /*@modifies errno, fileSystem@*/;
832 readlink (const char *path, /*@out@*/ char *buf, int size)
833 /*@modifies *buf, errno@*/;
836 select (int mfd, fd_set /*@null@*/ *r, fd_set /*@null@*/ *w, fd_set /*@null@*/ *e, struct timeval *t)
837 /*@modifies *r, *w, *e, *t, errno@*/;
841 /*@modifies errno, internalState@*/;
845 /*@modifies errno, internalState@*/;
848 setgroups (int ngroups, const gid_t *gidset)
849 /*@modifies errno, internalState@*/;
852 setregid (gid_t rgid, gid_t egid)
853 /*@modifies errno, internalState@*/;
856 setreuid (gid_t ruid, gid_t euid)
857 /*@modifies errno, internalState@*/;
861 /*@modifies fileSystem@*/;
864 symlink (const char *path, const char *path2)
865 /*@modifies fileSystem@*/;
868 truncate (const char *name, off_t length)
869 /*@modifies errno, fileSystem@*/;
871 /*@constant int EBADRPC@*/
872 /*@constant int ERPCMISMATCH@*/
873 /*@constant int EPROGUNAVAIL@*/
874 /*@constant int EPROGMISMATCH@*/
875 /*@constant int EPROCUNAVAIL@*/
876 /*@constant int EFTYPE@*/
877 /*@constant int EAUTH@*/
878 /*@constant int ENEEDAUTH@*/
879 /*@constant int ELAST@*/
881 /*________________________________________________________________________
885 /*@unchecked@*/ extern char *TMAGIC;
886 /*@constant int TMAGLEN@*/
887 /*@unchecked@*/ extern char *TVERSION;
888 /*@constant int TVERSLEN@*/
890 /*@constant int REGTYPE@*/
891 /*@constant int AREGTYPE@*/
892 /*@constant int LNKTYPE@*/
893 /*@constant int SYMTYPE@*/
894 /*@constant int CHRTYPE@*/
895 /*@constant int BLKTYPE@*/
896 /*@constant int DIRTYPE@*/
897 /*@constant int FIFOTYPE@*/
898 /*@constant int CONTTYPE@*/
900 /*@constant int TSUID@*/
901 /*@constant int TSGID@*/
902 /*@constant int TSVTX@*/
904 /*@constant int TUREAD@*/
905 /*@constant int TUWRITE@*/
906 /*@constant int TUEXEC@*/
907 /*@constant int TGREAD@*/
908 /*@constant int TGWRITE@*/
909 /*@constant int TGEXEC@*/
910 /*@constant int TOREAD@*/
911 /*@constant int TOWRITE@*/
912 /*@constant int TOEXEC@*/
915 uid_t uid; /* user id */
916 gid_t gid; /* group id */
917 uid_t cuid; /* creator user id */
918 gid_t cgid; /* creator group id */
919 mode_t mode; /* r/w permission */
920 ulong seq; /* slot usage sequence number */
921 key_t key; /* user specified msg/sem/shm key */
924 /*@constant int IPC_R@*/
925 /*@constant int IPC_W@*/
926 /*@constant int IPC_M@*/
927 /*@constant int IPC_CREAT@*/
928 /*@constant int IPC_EXCL@*/
929 /*@constant int IPC_NOWAIT@*/
930 /*@constant key_t IPC_PRIVATE@*/
931 /*@constant int IPC_RMID@*/
932 /*@constant int IPC_SET@*/
933 /*@constant int IPC_STAT@*/
935 /*________________________________________________________________________
940 struct ipc_perm msg_perm; /* msg queue permission bits */
941 struct msg *msg_first; /* first message in the queue */
942 struct msg *msg_last; /* last message in the queue */
943 u_long msg_cbytes; /* number of bytes in use on the queue */
944 u_long msg_qnum; /* number of msgs in the queue */
945 u_long msg_qbytes; /* max # of bytes on the queue */
946 pid_t msg_lspid; /* pid of last msgsnd() */
947 pid_t msg_lrpid; /* pid of last msgrcv() */
948 time_t msg_stime; /* time of last msgsnd() */
949 time_t msg_rtime; /* time of last msgrcv() */
950 time_t msg_ctime; /* time of last msgctl() */
954 long mtype; /* message type (+ve integer) */
955 char mtext[]; /* message body */
958 /*@constant int MSG_NOERROR@*/
959 /*@constant int MSGMAX@*/
960 /*@constant int MSGMNB@*/
961 /*@constant int MSGMNI@*/
962 /*@constant int MSGTQL@*/
965 msgctl (int id , int cmd, /*@out@*/ struct msqid_ds *buf)
966 /*@modifies errno, *buf@*/;
969 msgget (key_t key, int flag)
970 /*@modifies errno@*/;
973 msgrcv (int id, /*@out@*/ void *ptr, size_t nbytes, long type, int flags)
974 /*@modifies errno, *ptr@*/;
977 msgsnd (int id, const void *ptr, size_t nbytes, int flag)
978 /*@modifies errno@*/;
980 /*________________________________________________________________________
985 struct ipc_perm sem_perm;
986 struct sem *sem_base;
1001 struct semid_ds *buf;
1011 /*@constant int SEM_A@*/
1012 /*@constant int SEMAEM@*/
1013 /*@constant int SEMMNI@*/
1014 /*@constant int SEMMNS@*/
1015 /*@constant int SEMMNU@*/
1016 /*@constant int SEMMSL@*/
1017 /*@constant int SEMOPN@*/
1018 /*@constant int SEM_R@*/
1019 /*@constant int SEMUME@*/
1020 /*@constant int SEM_UNDO@*/
1021 /*@constant int SEMVMX@*/
1022 /*@constant int GETVAL@*/
1023 /*@constant int SETVAL@*/
1024 /*@constant int GETPID@*/
1025 /*@constant int GETNCNT@*/
1026 /*@constant int GETZCNT@*/
1027 /*@constant int GETALL@*/
1028 /*@constant int SETALL@*/
1030 /*@constant int ERMID@*/
1033 semctl (int id, int semnum, int cmd, union semun arg)
1034 /*@modifies errno@*/;
1037 semget (key_t key, int nsems, int flag)
1038 /*@modifies errno@*/;
1041 semop (int id, struct sembuf *semoparray, size_t nops)
1042 /*@modifies errno@*/;
1044 /*________________________________________________________________________
1049 struct ipc_perm shm_perm;
1061 /*@constant int SHMLBA@*/
1062 /*@constant int SHM_LOCK@*/
1063 /*@constant int SHMMAX@*/
1064 /*@constant int SHMMIN@*/
1065 /*@constant int SHMMNI@*/
1066 /*@constant int SHM_R@*/
1067 /*@constant int SHM_RDONLY@*/
1068 /*@constant int SHM_RND@*/
1069 /*@constant int SHMSEG@*/
1070 /*@constant int SHM_W@*/
1071 /*@constant int SHM_UNLOCK@*/
1074 shmat (int id, /*@null@*/ void *addr, int flag)
1075 /*@modifies errno@*/;
1078 shmctl (int id, int cmd, /*@out@*/ struct shmid_ds *buf)
1079 /*@modifies errno, *buf@*/;
1083 /*@modifies errno@*/;
1086 shmget (key_t key, int size, int flag)
1087 /*@modifies errno@*/;
1090 /*________________________________________________________________________
1091 * regex.h -- intended to be POSIX 1003.2 compliant
1094 typedef off_t regoff_t;
1098 size_t re_nsub; /* number of parenthesized subexpressions */
1099 char *re_endp; /* end pointer for REG_PEND */
1100 struct re_guts *re_g; /* none of your business :-) */
1104 regoff_t rm_so; /* start of match */
1105 regoff_t rm_eo; /* end of match */
1108 /* regcomp() flags */
1109 /*@constant int REG_BASIC@*/
1110 /*@constant int REG_EXTENDED@*/
1111 /*@constant int REG_ICASE@*/
1112 /*@constant int REG_NOSUB@*/
1113 /*@constant int REG_NEWLINE@*/
1114 /*@constant int REG_NOSPEC@*/
1115 /*@constant int REG_PEND@*/
1116 /*@constant int REG_DUMP@*/
1118 /* regerror() flags */
1119 /*@constant int REG_NOMATCH@*/
1120 /*@constant int REG_BADPAT@*/
1121 /*@constant int REG_ECOLLATE@*/
1122 /*@constant int REG_ECTYPE@*/
1123 /*@constant int REG_EESCAPE@*/
1124 /*@constant int REG_ESUBREG@*/
1125 /*@constant int REG_EBRACK@*/
1126 /*@constant int REG_EPAREN@*/
1127 /*@constant int REG_EBRACE@*/
1128 /*@constant int REG_BADBR@*/
1129 /*@constant int REG_ERANGE@*/
1130 /*@constant int REG_ESPACE@*/
1131 /*@constant int REG_BADRPT@*/
1132 /*@constant int REG_EMPTY@*/
1133 /*@constant int REG_ASSERT@*/
1134 /*@constant int REG_INVARG@*/
1135 /*@constant int REG_ATOI@*/ /* non standard */
1136 /*@constant int REG_ITOA@*/ /* non standard */
1138 /* regexec() flags */
1139 /*@constant int REG_NOTBOL@*/
1140 /*@constant int REG_NOTEOL@*/
1141 /*@constant int REG_STARTEND@*/
1142 /*@constant int REG_TRACE@*/
1143 /*@constant int REG_LARGE@*/
1144 /*@constant int REG_BACKR@*/
1147 regcomp (/*@out@*/ regex_t *preg, const char *pattern, int flags)
1148 /*@modifies *preg@*/;
1151 regerror (int code, const regex_t *re, /*@out@*/ char *errbuf, size_t bufsize)
1152 /*@modifies *errbuf@*/;
1155 regexec (const regex_t *preg, const char *s, size_t n, /*@out@*/ regmatch_t *m, int f)
1159 regfree (regex_t *p)
1162 /*________________________________________________________________________
1166 /*@constant int LOG_EMERG@*/
1167 /*@constant int LOG_ALERT@*/
1168 /*@constant int LOG_CRIT@*/
1169 /*@constant int LOG_ERR@*/
1170 /*@constant int LOG_WARNING@*/
1171 /*@constant int LOG_NOTICE@*/
1172 /*@constant int LOG_INFO@*/
1173 /*@constant int LOG_DEBUG@*/
1175 /*@constant int LOG_KERN@*/
1176 /*@constant int LOG_USER@*/
1177 /*@constant int LOG_MAIL@*/
1178 /*@constant int LOG_DAEMON@*/
1179 /*@constant int LOG_AUTH@*/
1180 /*@constant int LOG_SYSLOG@*/
1181 /*@constant int LOG_LPR@*/
1182 /*@constant int LOG_NEWS@*/
1183 /*@constant int LOG_UUCP@*/
1184 /*@constant int LOG_CRON@*/
1185 /*@constant int LOG_AUTHPRIV@*/
1186 /*@constant int LOG_FTP@*/
1187 /*@constant int LOG_LOCAL0@*/
1188 /*@constant int LOG_LOCAL1@*/
1189 /*@constant int LOG_LOCAL2@*/
1190 /*@constant int LOG_LOCAL3@*/
1191 /*@constant int LOG_LOCAL4@*/
1192 /*@constant int LOG_LOCAL5@*/
1193 /*@constant int LOG_LOCAL6@*/
1194 /*@constant int LOG_LOCAL7@*/
1196 /*@constant int LOG_PID@*/
1197 /*@constant int LOG_CONS@*/
1198 /*@constant int LOG_ODELAY@*/
1199 /*@constant int LOG_NDELAY@*/
1200 /*@constant int LOG_NOWAIT@*/
1201 /*@constant int LOG_PERROR@*/
1213 /*@modifies fileSystem@*/;
1216 openlog (const char *ident, int logopt, int facility)
1217 /*@modifies fileSystem@*/;
1220 setlogmask (int maskpri)
1221 /*@modifies internalState@*/;
1223 extern void /*@printflike@*/
1224 syslog (int priority, const char *message, ...)
1225 /*@modifies fileSystem@*/;
1228 vsyslog (int priority, const char *message, va_list args)
1229 /*@modifies fileSystem@*/;
1231 /*________________________________________________________________________
1237 /*@modifies internalState@*/;
1239 extern /*@null@*/ struct passwd *
1241 /*@modifies internalState@*/;
1244 setpassent (int stayopen)
1245 /*@modifies internalState@*/;
1249 /*@modifies internalState@*/;
1251 /*________________________________________________________________________
1257 /*@modifies internalState@*/;
1259 extern /*@null@*/ struct group *
1261 /*@modifies internalState@*/;
1265 /*@modifies internalState@*/;
1268 setgrfile (const char *name)
1269 /*@modifies internalState@*/;
1272 setgroupent (int stayopen)
1273 /*@modifies internalState@*/;
1275 /*________________________________________________________________________
1279 /*@constant int S_ISTXT@*/
1280 /*@constant int S_IREAD@*/
1281 /*@constant int S_IWRITE@*/
1282 /*@constant int S_IEXEC@*/
1283 /*@constant int S_IFMT@*/
1284 /*@constant int S_IFIFO@*/
1285 /*@constant int S_IFCHR@*/
1286 /*@constant int S_IFDIR@*/
1287 /*@constant int S_IFBLK@*/
1288 /*@constant int S_IFREG@*/
1289 /*@constant int S_IFLNK@*/
1290 /*@constant int S_IFSOCK@*/
1291 /*@constant int S_ISVTX@*/
1292 /*@constant int S_ISVTX@*/
1293 /*@constant int SF_SETTABLE@*/
1294 /*@constant int SF_ARCHIVED@*/
1295 /*@constant int ACCESSPERMS@*/
1296 /*@constant int ALLPERMS@*/
1297 /*@constant int DEFFILEMODE@*/
1298 /*@constant int S_BLKSIZE@*/
1299 /*@constant int SF_IMMUTABLE@*/
1300 /*@constant int SF_APPEND@*/
1301 /*@constant int UF_NODUMP@*/
1302 /*@constant int UF_IMMUTABLE@*/
1303 /*@constant int UF_APPEND@*/
1305 extern int /*@alt lltX_bool@*/
1306 S_ISLNK (/*@sef@*/ mode_t m)
1309 extern int /*@alt lltX_bool@*/
1310 S_ISSOCK (/*@sef@*/ mode_t m)
1314 chflags (const char *path, u_long flags)
1315 /*@modifies fileSystem, errno@*/;
1318 fchflags (int fd, u_long flags)
1319 /*@modifies fileSystem, errno@*/;
1322 fchmod (int fd, mode_t mode)
1323 /*@modifies fileSystem, errno@*/;
1326 lstat (const char *path, /*@out@*/ struct stat *buf)
1327 /*@modifies errno, *buf@*/;
1329 /*________________________________________________________________________
1333 /*@constant int FMNAMESZ@*/
1334 /*@constant int MSG_BAND@*/
1335 /*@constant int MSG_HIPRI@*/
1336 /*@constant int RS_HIPRI@*/
1337 /*@constant int S_INPUT@*/
1338 /*@constant int S_RDNORM@*/
1339 /*@constant int S_RDBAND@*/
1340 /*@constant int S_BANDURG@*/
1341 /*@constant int S_HIPRI@*/
1342 /*@constant int S_OUTPUT@*/
1343 /*@constant int S_WRNORM@*/
1344 /*@constant int S_WRBAND@*/
1345 /*@constant int S_MSG@*/
1346 /*@constant int S_ERROR@*/
1347 /*@constant int S_HANGUP@*/
1361 struct str_mlist *sl_modlist;
1365 getmsg (int fd, /*@out@*/ struct strbuf *c, /*@out@*/ struct strbuf *d, int *f)
1366 /*@modifies *c, *d, errno@*/;
1369 getpmsg (int fd, /*@out@*/ struct strbuf *c, /*@out@*/ struct strbuf *d, int *b, int *f)
1370 /*@modifies *b, *c, *d, errno@*/;
1373 putmsg (int fd, const struct strbuf *c, const struct strbuf *d, int *f)
1374 /*@modifies internalState, errno@*/;
1377 putpmsg (int fd, const struct strbuf *c, const struct strbuf *d, int b, int *f)
1378 /*@modifies internalState, errno@*/;
1380 /*________________________________________________________________________
1384 /*@constant int RLIMIT_CPU@*/
1385 /*@constant int RLIMIT_FSIZE@*/
1386 /*@constant int RLIMIT_DATA@*/
1387 /*@constant int RLIMIT_STACK@*/
1388 /*@constant int RLIMIT_CORE@*/
1389 /*@constant int RLIMIT_RSS@*/
1390 /*@constant int RLIMIT_MEMLOCK@*/
1391 /*@constant int RLIMIT_NPROC@*/
1392 /*@constant int RLIMIT_NOFILE@*/
1393 /*@constant int RLIM_NLIMITS@*/
1394 /*@constant int RLIM_INFINITY@*/
1395 /*@constant int PRIO_MIN@*/
1396 /*@constant int PRIO_MAX@*/
1397 /*@constant int PRIO_PROCESS@*/
1398 /*@constant int PRIO_PGRP@*/
1399 /*@constant int PRIO_USER@*/
1400 /*@constant int RUSAGE_SELF@*/
1401 /*@constant int RUSAGE_CHILDREN@*/
1404 struct timeval ru_utime; /* user time used */
1405 struct timeval ru_stime; /* system time used */
1406 long ru_maxrss; /* max resident set size */
1407 long ru_ixrss; /* integral shared memory size */
1408 long ru_idrss; /* integral unshared data " */
1409 long ru_isrss; /* integral unshared stack " */
1410 long ru_minflt; /* page reclaims */
1411 long ru_majflt; /* page faults */
1412 long ru_nswap; /* swaps */
1413 long ru_inblock; /* block input operations */
1414 long ru_oublock; /* block output operations */
1415 long ru_msgsnd; /* messages sent */
1416 long ru_msgrcv; /* messages received */
1417 long ru_nsignals; /* signals received */
1418 long ru_nvcsw; /* voluntary context switches */
1419 long ru_nivcsw; /* involuntary " */
1428 unsigned long ldavg[3];
1433 getpriority (int which, int who)
1434 /*@modifies errno@*/;
1437 getrlimit (int res, /*@out@*/ struct rlimit *rlp)
1438 /*@modifies *rlp, errno@*/;
1441 getrusage (int who, /*@out@*/ struct rusage *rusage)
1442 /*@modifies *rusage, errno@*/;
1445 setpriority (int which, int who, int prio)
1446 /*@modifies errno, internalState@*/;
1449 setrlimit (int resource, const struct rlimit *rlp)
1450 /*@modifies errno, internalState@*/;