1 | /* unistd.h (emx+gcc) */
|
---|
2 |
|
---|
3 | #ifndef _UNISTD_H
|
---|
4 | #define _UNISTD_H
|
---|
5 |
|
---|
6 | #if defined (__cplusplus)
|
---|
7 | extern "C" {
|
---|
8 | #endif
|
---|
9 |
|
---|
10 | #if defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE)
|
---|
11 | #define _POSIX_SOURCE
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | #if !defined (_SIZE_T)
|
---|
15 | #define _SIZE_T
|
---|
16 | typedef unsigned long size_t;
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | #if !defined (_SSIZE_T)
|
---|
20 | #define _SSIZE_T
|
---|
21 | typedef int ssize_t;
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #if !defined (NULL)
|
---|
25 | #if defined (__cplusplus)
|
---|
26 | #define NULL 0
|
---|
27 | #else
|
---|
28 | #define NULL ((void *)0)
|
---|
29 | #endif
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | #if !defined (STDIN_FILENO)
|
---|
33 | #define STDIN_FILENO 0
|
---|
34 | #define STDOUT_FILENO 1
|
---|
35 | #define STDERR_FILENO 2
|
---|
36 | #endif
|
---|
37 |
|
---|
38 | #if !defined (F_OK)
|
---|
39 | #define F_OK 0
|
---|
40 | #define X_OK 1
|
---|
41 | #define W_OK 2
|
---|
42 | #define R_OK 4
|
---|
43 | #endif
|
---|
44 |
|
---|
45 | #if !defined (SEEK_SET)
|
---|
46 | #define SEEK_SET 0
|
---|
47 | #define SEEK_CUR 1
|
---|
48 | #define SEEK_END 2
|
---|
49 | #endif
|
---|
50 |
|
---|
51 | #if !defined (_PC_LINK_MAX)
|
---|
52 | #define _PC_LINK_MAX 1
|
---|
53 | #define _PC_MAX_CANON 2
|
---|
54 | #define _PC_MAX_INPUT 3
|
---|
55 | #define _PC_NAME_MAX 4
|
---|
56 | #define _PC_PATH_MAX 5
|
---|
57 | #define _PC_PIPE_BUF 6
|
---|
58 | #define _PC_CHOWN_RESTRICTED 7
|
---|
59 | #define _PC_NO_TRUNC 8
|
---|
60 | #define _PC_VDISABLE 9
|
---|
61 | #endif
|
---|
62 |
|
---|
63 | #if !defined (_SC_ARG_MAX)
|
---|
64 | #define _SC_ARG_MAX 1
|
---|
65 | #define _SC_CHILD_MAX 2
|
---|
66 | #define _SC_CLK_TCK 3
|
---|
67 | #define _SC_NGROUPS_MAX 4
|
---|
68 | #define _SC_OPEN_MAX 5
|
---|
69 | #define _SC_STREAM_MAX 6
|
---|
70 | #define _SC_TZNAME_MAX 7
|
---|
71 | #define _SC_JOB_CONTROL 8
|
---|
72 | #define _SC_SAVED_IDS 9
|
---|
73 | #define _SC_VERSION 10
|
---|
74 | #endif
|
---|
75 |
|
---|
76 | #if !defined (_POSIX_VERSION)
|
---|
77 | #define _POSIX_VERSION 199009L
|
---|
78 | #endif
|
---|
79 |
|
---|
80 |
|
---|
81 | int access (__const__ char *, int);
|
---|
82 | unsigned alarm (unsigned);
|
---|
83 | int chdir (__const__ char *);
|
---|
84 | /* chown() */
|
---|
85 | int close (int);
|
---|
86 | /* ctermid() */
|
---|
87 | char *cuserid (char *);
|
---|
88 | int dup (int);
|
---|
89 | int dup2 (int, int);
|
---|
90 | int execl (__const__ char *, __const__ char *, ...);
|
---|
91 | int execle (__const__ char *, __const__ char *, ...);
|
---|
92 | int execlp (__const__ char *, __const__ char *, ...);
|
---|
93 | int execv (__const__ char *, char * __const__ *);
|
---|
94 | int execve (__const__ char *, char * __const__ *, char * __const__ *);
|
---|
95 | int execvp (__const__ char *, char * __const__ *);
|
---|
96 | void _exit (int) __attribute__ ((__noreturn__));
|
---|
97 | int fork (void);
|
---|
98 | long fpathconf (int, int);
|
---|
99 | char *getcwd (char *, size_t);
|
---|
100 | int getegid (void); /* gid_t getegid (void); */
|
---|
101 | int geteuid (void); /* uid_t geteuid (void); */
|
---|
102 | int getgid (void); /* gid_t getgid (void); */
|
---|
103 | int getgroups (int, int *); /* int getgroups (int, gid_t *); */
|
---|
104 | char *getlogin (void);
|
---|
105 | int getpgrp (void); /* pid_t getpgrp (void); */
|
---|
106 | int getpid (void); /* pid_t getpid (void); */
|
---|
107 | int getppid (void); /* pid_t getppid (void); */
|
---|
108 | int getuid (void); /* uid_t getuid (void); */
|
---|
109 | int isatty (int);
|
---|
110 | /* link() */
|
---|
111 | long lseek (int, long, int);
|
---|
112 | long pathconf (__const__ char *, int);
|
---|
113 | int pause (void);
|
---|
114 | int pipe (int *);
|
---|
115 | int read (int, void *, size_t);
|
---|
116 | int rmdir (__const__ char *);
|
---|
117 | int setgid (int); /* int setsid (gid_t); */
|
---|
118 | int setpgid (int, int); /* int setpgid (gid_t, gid_t); */
|
---|
119 | int setsid (void); /* pid_t setsid (void); */
|
---|
120 | int setuid (int); /* setuid (uid_t); */
|
---|
121 | unsigned sleep (unsigned);
|
---|
122 | long sysconf (int);
|
---|
123 | int tcgetpgrp (int); /* pid_t tcgetpgrp (int); */
|
---|
124 | int tcsetpgrp (int, int); /* int tcsetpgrp (int, pid_t) */
|
---|
125 | char *ttyname (int);
|
---|
126 | int unlink (__const__ char *);
|
---|
127 | int write (int, __const__ void *, size_t);
|
---|
128 |
|
---|
129 |
|
---|
130 | #if !defined (_POSIX_SOURCE)
|
---|
131 |
|
---|
132 | void *brk (void *);
|
---|
133 | char *getpass (__const__ char *);
|
---|
134 | char *_getpass1 (__const__ char *);
|
---|
135 | char *_getpass2 (__const__ char *, int);
|
---|
136 | int mkstemp (char *);
|
---|
137 | char *mktemp (char *);
|
---|
138 | int profil (void *, unsigned, unsigned, unsigned);
|
---|
139 | void *sbrk (int);
|
---|
140 |
|
---|
141 | #endif
|
---|
142 |
|
---|
143 |
|
---|
144 | #if !defined (_POSIX_SOURCE) || _POSIX_C_SOURCE >= 2
|
---|
145 |
|
---|
146 | extern char *optarg;
|
---|
147 | extern int optind;
|
---|
148 | extern int opterr;
|
---|
149 | extern int optopt;
|
---|
150 |
|
---|
151 | /* Note: The 2nd argument is not const as GETOPT_ANY reorders the
|
---|
152 | array pointed to. */
|
---|
153 |
|
---|
154 | int getopt (int, char **, __const__ char *);
|
---|
155 |
|
---|
156 | #endif
|
---|
157 |
|
---|
158 |
|
---|
159 | #if !defined (_POSIX_SOURCE) || defined (_WITH_UNDERSCORE)
|
---|
160 |
|
---|
161 | extern char *_optarg;
|
---|
162 | extern int _optind;
|
---|
163 | extern int _opterr;
|
---|
164 | extern int _optopt;
|
---|
165 |
|
---|
166 | int _getopt (int, char **, __const__ char *);
|
---|
167 |
|
---|
168 | int _access (__const__ char *, int);
|
---|
169 | unsigned _alarm (unsigned);
|
---|
170 | int _chdir (__const__ char *);
|
---|
171 | int _close (int);
|
---|
172 | char *_cuserid (char *);
|
---|
173 | int _dup (int);
|
---|
174 | int _dup2 (int, int);
|
---|
175 | int _execl (__const__ char *, __const__ char *, ...);
|
---|
176 | int _execle (__const__ char *, __const__ char *, ...);
|
---|
177 | int _execlp (__const__ char *, __const__ char *, ...);
|
---|
178 | int _execv (__const__ char *, char * __const__ *);
|
---|
179 | int _execve (__const__ char *, char * __const__ *, char * __const__ *);
|
---|
180 | int _execvp (__const__ char *, char * __const__ *);
|
---|
181 | int _fork (void);
|
---|
182 | long _fpathconf (int, int);
|
---|
183 | char *_getcwd (char *, size_t);
|
---|
184 | int _getegid (void);
|
---|
185 | int _geteuid (void);
|
---|
186 | int _getgid (void);
|
---|
187 | int _getgroups (int, int *);
|
---|
188 | char *_getlogin (void);
|
---|
189 | int _getpgrp (void);
|
---|
190 | int _getpid (void);
|
---|
191 | int _getppid (void);
|
---|
192 | int _getuid (void);
|
---|
193 | int _isatty (int);
|
---|
194 | long _lseek (int, long, int);
|
---|
195 | long _pathconf (__const__ char *, int);
|
---|
196 | int _pause (void);
|
---|
197 | int _pipe (int *);
|
---|
198 | int _read (int, void *, size_t);
|
---|
199 | int _rmdir (__const__ char *);
|
---|
200 | int _setgid (int);
|
---|
201 | int _setpgid (int, int);
|
---|
202 | int _setsid (void);
|
---|
203 | int _setuid (int);
|
---|
204 | unsigned _sleep (unsigned);
|
---|
205 | long _sysconf (int);
|
---|
206 | int _tcgetpgrp (int);
|
---|
207 | int _tcsetpgrp (int, int);
|
---|
208 | char *_ttyname (int);
|
---|
209 | int _unlink (__const__ char *);
|
---|
210 | int _write (int, __const__ void *, size_t);
|
---|
211 |
|
---|
212 | void *_brk (void *);
|
---|
213 | char *_getpass (__const__ char *);
|
---|
214 | char *_getpass1 (__const__ char *);
|
---|
215 | char *_getpass2 (__const__ char *, int);
|
---|
216 | int _mkstemp (char *);
|
---|
217 | char *_mktemp (char *);
|
---|
218 | int _profil (void *, unsigned, unsigned, unsigned);
|
---|
219 | void *_brk (void *);
|
---|
220 |
|
---|
221 | #endif
|
---|
222 |
|
---|
223 |
|
---|
224 | #if defined (__cplusplus)
|
---|
225 | }
|
---|
226 | #endif
|
---|
227 |
|
---|
228 | #endif /* not _UNISTD_H */
|
---|