|
|
1.1 root 1: /* (-lgl
2: * COHERENT Version 4.0
3: * Copyright (c) 1982, 1993 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6: /*
7: * /usr/include/unistd.h
8: * Cf. Intel iBSC2, pp. 6-82, 6-83.
9: * Revised Sun Jun 20 1993 for prototypes -- NB
10: */
11:
12: #ifndef __UNISTD_H__
13: #define __UNISTD_H__
14:
15: #include <common/ccompat.h>
16: #include <common/__pid.h>
17: #include <common/__off.h>
18: #include <common/_size.h>
19: #include <common/_ssize.h>
20: #include <common/_uid.h>
21: #include <common/whence.h>
22:
23: /* Access modes. */
24: #define F_OK 0
25: #define X_OK 1
26: #define W_OK 2
27: #define R_OK 4
28:
29: /* lockf() commands. */
30: #define F_ULOCK 0 /* unlock region */
31: #define F_LOCK 1 /* sleep until available and lock */
32: #define F_TLOCK 2 /* lock if available, EAGAIN if not */
33: #define F_TEST 3 /* return 0 if available, EAGAIN if not */
34:
35: /* File descriptors for standard FILEs. */
36: #define STDIN_FILENO 0
37: #define STDOUT_FILENO 1
38: #define STDERR_FILENO 2
39:
40: /*
41: * Names for pathconf () and fpathconf ().
42: */
43:
44: #define _PC_LINK_MAX 0
45: #define _PC_MAX_CANON 1
46: #define _PC_MAX_INPUT 2
47: #define _PC_NAME_MAX 3
48: #define _PC_PATH_MAX 4
49: #define _PC_PIPE_BUF 5
50: #define _PC_CHOWN_RESTRICTED 6
51: #define _PC_NO_TRUNC 7
52: #define _PC_VDISABLE 8
53:
54:
55: /*
56: * Names for sysconf ().
57: */
58:
59: #define _SC_ARG_MAX 0
60: #define _SC_CHILD_MAX 1
61: #define _SC_CLK_TCK 2
62: #define _SC_NGROUPS_MAX 3
63: #define _SC_OPEN_MAX 4
64: #define _SC_JOB_CONTROL 5
65: #define _SC_SAVED_IDS 6
66: #define _SC_VERSION 7
67: #define _SC_XOPEN_VERSION 8
68: #define _SC_LOGNAME_MAX 9
69:
70:
71: __EXTERN_C_BEGIN__
72:
73: __NO_RETURN__ void
74: _exit __PROTO ((int _status));
75: int access __PROTO ((__CONST__ char * _path,
76: int _mode));
77: unsigned int alarm __PROTO ((unsigned int _seconds));
78: int chdir __PROTO ((__CONST__ char * _path));
79: int chown __PROTO ((__CONST__ char * _path,
80: __uid_t _owner, __gid_t _group));
81: int close __PROTO ((int _fildes));
82: char * ctermid __PROTO ((char * _s));
83: int dup __PROTO ((int _fildes));
84: int dup2 __PROTO ((int _fildes, int _fildes2));
85: int execl __PROTO ((__CONST__ char * _path,
86: __CONST__ char * _arg, ...));
87: int execle __PROTO ((__CONST__ char * _path,
88: __CONST__ char * _arg, ...));
89: int execlp __PROTO ((__CONST__ char * _file,
90: __CONST__ char * _arg, ...));
91: int execv __PROTO ((__CONST__ char * _path,
92: char * __CONST__ _argv []));
93: int execve __PROTO ((__CONST__ char * _path,
94: char * __CONST__ _argv [],
95: char * __CONST__ _envp []));
96: int execvp __PROTO ((__CONST__ char * _file,
97: char * __CONST__ _argv []));
98: __pid_t fork __PROTO ((void));
99: char * getcwd __PROTO ((char * _buf, size_t _size));
100: __gid_t getegid __PROTO ((void));
101: __uid_t geteuid __PROTO ((void));
102: __gid_t getgid __PROTO ((void));
103: char * getlogin __PROTO ((void));
104: __pid_t getpgrp __PROTO ((void));
105: __pid_t getpid __PROTO ((void));
106: __pid_t getppid __PROTO ((void));
107: __uid_t getuid __PROTO ((void));
108: int isatty __PROTO ((int _fildes));
109: int link __PROTO ((__CONST__ char * _existing,
110: __CONST__ char * _new));
111: __off_t lseek __PROTO ((int _fildes, __off_t _offset,
112: int _whence));
113: int pause __PROTO ((void));
114: int pipe __PROTO ((int _fildes [2]));
115: int read __PROTO ((int _fildes, __VOID__ * _buf,
116: size_t _nbyte));
117: int rmdir __PROTO ((__CONST__ char * _path));
118: int setgid __PROTO ((__gid_t _gid));
119: int setuid __PROTO ((__uid_t _uid));
120: unsigned int sleep __PROTO ((unsigned int _seconds));
121: char * ttyname __PROTO ((int _fildes));
122: int unlink __PROTO ((__CONST__ char * _path));
123: int write __PROTO ((int _fildes,
124: __CONST__ __VOID__ * _buf,
125: size_t _nbyte));
126:
127: #if 0 /* not supported */
128: long fpathconf __PROTO ((int _fildes, int _name));
129: int getgroups __PROTO ((int _gidsetsize,
130: __gid_t _grouplist []));
131: long pathconf __PROTO ((__CONST__ char * _path, int _name));
132: int setpgid __PROTO ((__pid_t _pid, __pid_t _pgid));
133: __pid_t setsid __PROTO ((void));
134: long sysconf __PROTO ((int _name));
135: __pid_t tcgetpgrp __PROTO ((int _fildes));
136: int tcsetpgrp __PROTO ((int _fildes, __pid_t _pgrp_id));
137: #endif /* 0 */
138:
139: #if ! _POSIX_SOURCE
140: int brk __PROTO ((__VOID__ * _endds));
141: __VOID__ * sbrk __PROTO ((int _incr));
142: #endif
143:
144: __EXTERN_C_END__
145:
146: #endif /* ! defined (__UNISTD_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.