1 | /* $Id: */
|
---|
2 | /** @file
|
---|
3 | * EMX/FreeBSD 5.1
|
---|
4 | *
|
---|
5 | * @changed Commented out stuff which isn't implemented, TCPIP stuff at bottom.
|
---|
6 | * @todo Several man-years.. ;) Serious, complete the FreeBSD 5.1 merge and
|
---|
7 | * implement all the functions. Currently there is a bunch of POSIX
|
---|
8 | * #defines missing.
|
---|
9 | */
|
---|
10 |
|
---|
11 | /*-
|
---|
12 | * Copyright (c) 1991, 1993, 1994
|
---|
13 | * The Regents of the University of California. All rights reserved.
|
---|
14 | *
|
---|
15 | * Redistribution and use in source and binary forms, with or without
|
---|
16 | * modification, are permitted provided that the following conditions
|
---|
17 | * are met:
|
---|
18 | * 1. Redistributions of source code must retain the above copyright
|
---|
19 | * notice, this list of conditions and the following disclaimer.
|
---|
20 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
21 | * notice, this list of conditions and the following disclaimer in the
|
---|
22 | * documentation and/or other materials provided with the distribution.
|
---|
23 | * 3. All advertising materials mentioning features or use of this software
|
---|
24 | * must display the following acknowledgement:
|
---|
25 | * This product includes software developed by the University of
|
---|
26 | * California, Berkeley and its contributors.
|
---|
27 | * 4. Neither the name of the University nor the names of its contributors
|
---|
28 | * may be used to endorse or promote products derived from this software
|
---|
29 | * without specific prior written permission.
|
---|
30 | *
|
---|
31 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
---|
32 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
33 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
34 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
---|
35 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
39 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
40 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
41 | * SUCH DAMAGE.
|
---|
42 | *
|
---|
43 | * @(#)unistd.h 8.12 (Berkeley) 4/27/95
|
---|
44 | * $FreeBSD: src/include/unistd.h,v 1.66 2002/12/29 01:07:55 mike Exp $
|
---|
45 | */
|
---|
46 |
|
---|
47 | #ifndef _UNISTD_H_
|
---|
48 | #define _UNISTD_H_
|
---|
49 | #define _UNISTD_H /* bird: emx */
|
---|
50 |
|
---|
51 |
|
---|
52 | #include <sys/cdefs.h>
|
---|
53 | #include <sys/types.h> /* XXX adds too much pollution. */
|
---|
54 | /** @todo port FreeBSD sys/unistd.h: #include <sys/unistd.h> */
|
---|
55 | #include <sys/_types.h>
|
---|
56 |
|
---|
57 | #if !defined(_GID_T_DECLARED) && !defined(_GID_T) /* bird: emx */
|
---|
58 | typedef __gid_t gid_t; /* group id */
|
---|
59 | #define _GID_T_DECLARED
|
---|
60 | #define _GID_T /* bird: emx */
|
---|
61 | #endif
|
---|
62 |
|
---|
63 | #if !defined(_OFF_T_DECLARED) && !defined(_OFF_T) /* bird:emx */
|
---|
64 | typedef __off_t off_t; /* file offset */
|
---|
65 | #define _OFF_T_DECLARED
|
---|
66 | #define _OFF_T /* bird: emx */
|
---|
67 | #endif
|
---|
68 |
|
---|
69 | #if !defined(_PID_T_DECLARED) && !defined(_PID_T) /* bird:emx */
|
---|
70 | typedef __pid_t pid_t; /* process id */
|
---|
71 | #define _PID_T_DECLARED
|
---|
72 | #define _PID_T /* bird: emx */
|
---|
73 | #endif
|
---|
74 |
|
---|
75 | #if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird: emx */
|
---|
76 | typedef __size_t size_t;
|
---|
77 | #define _SIZE_T_DECLARED
|
---|
78 | #define _SIZE_T /* bird: emx */
|
---|
79 | #endif
|
---|
80 |
|
---|
81 | #if !defined(_SSIZE_T_DECLARED) && !defined(_SSIZE_T) /* bird: emx */
|
---|
82 | typedef __ssize_t ssize_t;
|
---|
83 | #define _SSIZE_T_DECLARED
|
---|
84 | #define _SSIZE_T /* bird: emx */
|
---|
85 | #endif
|
---|
86 |
|
---|
87 | #if !defined(_UID_T_DECLARED) && !defined(_UID_T) /* bird: emx */
|
---|
88 | typedef __uid_t uid_t; /* user id */
|
---|
89 | #define _UID_T_DECLARED
|
---|
90 | #define _UID_T /* bird: emx */
|
---|
91 | #endif
|
---|
92 |
|
---|
93 | #ifndef _USECONDS_T_DECLARED
|
---|
94 | typedef __useconds_t useconds_t; /* microseconds (unsigned) */
|
---|
95 | #define _USECONDS_T_DECLARED
|
---|
96 | #endif
|
---|
97 |
|
---|
98 | #if !defined(STDIN_FILENO) /* bird: emx */
|
---|
99 | #define STDIN_FILENO 0 /* standard input file descriptor */
|
---|
100 | #define STDOUT_FILENO 1 /* standard output file descriptor */
|
---|
101 | #define STDERR_FILENO 2 /* standard error file descriptor */
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | #ifndef NULL
|
---|
105 | #define NULL 0 /* null pointer constant */
|
---|
106 | #endif
|
---|
107 |
|
---|
108 | #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
|
---|
109 | #define F_ULOCK 0 /* unlock locked section */
|
---|
110 | #define F_LOCK 1 /* lock a section for exclusive use */
|
---|
111 | #define F_TLOCK 2 /* test and lock a section for exclusive use */
|
---|
112 | #define F_TEST 3 /* test a section for locks by other procs */
|
---|
113 | #endif
|
---|
114 |
|
---|
115 |
|
---|
116 | /** @todo: big todo to get in all the POSIX defines. */
|
---|
117 |
|
---|
118 | /* whence values for lseek(2) */
|
---|
119 | #ifndef SEEK_SET
|
---|
120 | #define SEEK_SET 0 /* set file offset to offset */
|
---|
121 | #define SEEK_CUR 1 /* set file offset to current plus offset */
|
---|
122 | #define SEEK_END 2 /* set file offset to EOF plus offset */
|
---|
123 | #endif
|
---|
124 |
|
---|
125 | #ifndef _POSIX_SOURCE
|
---|
126 | /* whence values for lseek(2); renamed by POSIX 1003.1 */
|
---|
127 | #define L_SET SEEK_SET
|
---|
128 | #define L_INCR SEEK_CUR
|
---|
129 | #define L_XTND SEEK_END
|
---|
130 | #endif
|
---|
131 |
|
---|
132 | #if !defined (F_OK)
|
---|
133 | #define F_OK 0
|
---|
134 | #define X_OK 1
|
---|
135 | #define W_OK 2
|
---|
136 | #define R_OK 4
|
---|
137 | #endif
|
---|
138 |
|
---|
139 | #if !defined (SEEK_SET)
|
---|
140 | #define SEEK_SET 0
|
---|
141 | #define SEEK_CUR 1
|
---|
142 | #define SEEK_END 2
|
---|
143 | #endif
|
---|
144 |
|
---|
145 | #if !defined (_PC_LINK_MAX)
|
---|
146 | #define _PC_LINK_MAX 1
|
---|
147 | #define _PC_MAX_CANON 2
|
---|
148 | #define _PC_MAX_INPUT 3
|
---|
149 | #define _PC_NAME_MAX 4
|
---|
150 | #define _PC_PATH_MAX 5
|
---|
151 | #define _PC_PIPE_BUF 6
|
---|
152 | #define _PC_CHOWN_RESTRICTED 7
|
---|
153 | #define _PC_NO_TRUNC 8
|
---|
154 | #define _PC_VDISABLE 9
|
---|
155 | #endif
|
---|
156 |
|
---|
157 | #if !defined (_SC_ARG_MAX)
|
---|
158 | #define _SC_ARG_MAX 1
|
---|
159 | #define _SC_CHILD_MAX 2
|
---|
160 | #define _SC_CLK_TCK 3
|
---|
161 | #define _SC_NGROUPS_MAX 4
|
---|
162 | #define _SC_OPEN_MAX 5
|
---|
163 | #define _SC_STREAM_MAX 6
|
---|
164 | #define _SC_TZNAME_MAX 7
|
---|
165 | #define _SC_JOB_CONTROL 8
|
---|
166 | #define _SC_SAVED_IDS 9
|
---|
167 | #define _SC_VERSION 10
|
---|
168 | #endif
|
---|
169 |
|
---|
170 | #if !defined (_POSIX_VERSION)
|
---|
171 | #define _POSIX_VERSION 199009L
|
---|
172 | #endif
|
---|
173 |
|
---|
174 |
|
---|
175 | __BEGIN_DECLS
|
---|
176 | /* 1003.1-1990 */
|
---|
177 | void _exit(int) __dead2;
|
---|
178 | int access(const char *, int);
|
---|
179 | unsigned int alarm(unsigned int);
|
---|
180 | int chdir(const char *);
|
---|
181 | int chown(const char *, uid_t, gid_t);
|
---|
182 | int close(int);
|
---|
183 | char * cuserid(char *); /* bird: emx/todo/obosolete? */
|
---|
184 | int dup(int);
|
---|
185 | int dup2(int, int);
|
---|
186 | int eaccess(const char *, int);
|
---|
187 | int execl(const char *, const char *, ...);
|
---|
188 | int execle(const char *, const char *, ...);
|
---|
189 | int execlp(const char *, const char *, ...);
|
---|
190 | int execv(const char *, char * const *);
|
---|
191 | int execve(const char *, char * const *, char * const *);
|
---|
192 | int execvp(const char *, char * const *);
|
---|
193 | pid_t fork(void);
|
---|
194 | long fpathconf(int, int);
|
---|
195 | char *getcwd(char *, size_t);
|
---|
196 | gid_t getegid(void);
|
---|
197 | uid_t geteuid(void);
|
---|
198 | gid_t getgid(void);
|
---|
199 | int getgroups(int, gid_t []);
|
---|
200 | char *getlogin(void);
|
---|
201 | pid_t getpgrp(void);
|
---|
202 | pid_t getpid(void);
|
---|
203 | pid_t getppid(void);
|
---|
204 | uid_t getuid(void);
|
---|
205 | int isatty(int);
|
---|
206 | int link(const char *, const char *);
|
---|
207 | #ifndef _LSEEK_DECLARED
|
---|
208 | #define _LSEEK_DECLARED
|
---|
209 | off_t lseek(int, off_t, int);
|
---|
210 | #endif
|
---|
211 | long pathconf(const char *, int);
|
---|
212 | int pause(void);
|
---|
213 | int pipe(int *);
|
---|
214 | ssize_t read(int, void *, size_t);
|
---|
215 | int rmdir(const char *);
|
---|
216 | int setgid(gid_t);
|
---|
217 | /** @todo void setproctitle(const char *_fmt, ...) __printf0like(1, 2); */
|
---|
218 | int setpgid(pid_t, pid_t);
|
---|
219 | pid_t setsid(void);
|
---|
220 | int setuid(uid_t);
|
---|
221 | unsigned sleep(unsigned);
|
---|
222 | long sysconf(int);
|
---|
223 | pid_t tcgetpgrp(int);
|
---|
224 | int tcsetpgrp(int, pid_t);
|
---|
225 | char *ttyname(int);
|
---|
226 | int unlink(const char *);
|
---|
227 | int write(int, const void *, size_t);
|
---|
228 |
|
---|
229 | /* 1003.2-1992 */
|
---|
230 | #if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE
|
---|
231 | /** @todo size_t confstr(int, char *, size_t);*/
|
---|
232 | int getopt(int, char * const [], const char *);
|
---|
233 |
|
---|
234 | extern char *optarg; /* getopt(3) external variables */
|
---|
235 | extern int optind, opterr, optopt;
|
---|
236 | #endif
|
---|
237 |
|
---|
238 | /* ISO/IEC 9945-1: 1996 */
|
---|
239 | #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
|
---|
240 | int fsync(int);
|
---|
241 |
|
---|
242 | /*
|
---|
243 | * ftruncate() was in the POSIX Realtime Extension (it's used for shared
|
---|
244 | * memory), but truncate() was not.
|
---|
245 | */
|
---|
246 | #ifndef _FTRUNCATE_DECLARED
|
---|
247 | #define _FTRUNCATE_DECLARED
|
---|
248 | int ftruncate(int, off_t);
|
---|
249 | #endif
|
---|
250 | #endif
|
---|
251 |
|
---|
252 | #if __POSIX_VISIBLE >= 199506
|
---|
253 | /** @todo int getlogin_r(char *, int); */
|
---|
254 | #endif
|
---|
255 |
|
---|
256 | /* 1003.1-2001 */
|
---|
257 | #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
|
---|
258 | int fchown(int, uid_t, gid_t);
|
---|
259 | int readlink(const char *, char *, int);
|
---|
260 | #endif
|
---|
261 | #if __POSIX_VISIBLE >= 200112
|
---|
262 | /* tcpip: int gethostname(char *, int / * socklen_t * /); */
|
---|
263 | /** @todo int setegid(gid_t); */
|
---|
264 | /** @todo int seteuid(uid_t); */
|
---|
265 | #endif
|
---|
266 |
|
---|
267 | /*
|
---|
268 | * symlink() was originally in POSIX.1a, which was withdrawn after
|
---|
269 | * being overtaken by events (1003.1-2001). It was in XPG4.2, and of
|
---|
270 | * course has been in BSD since 4.2.
|
---|
271 | */
|
---|
272 | #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE
|
---|
273 | int symlink(const char * __restrict, const char * __restrict);
|
---|
274 | #endif
|
---|
275 |
|
---|
276 | /* X/Open System Interfaces */
|
---|
277 | #if __XSI_VISIBLE
|
---|
278 | /** @todo char *crypt(const char *, const char *); */
|
---|
279 | /** @todo char *ctermid(char *); */ /* XXX ??? */
|
---|
280 | /** @todo int encrypt(char *, int); */
|
---|
281 | /** @todo int fchdir(int); */
|
---|
282 | /* tcpip: long gethostid(void); */
|
---|
283 | /** @todo int getpgid(pid_t _pid); */
|
---|
284 | /** @todo int getsid(pid_t _pid); */
|
---|
285 | char *getwd(char *); /* LEGACY: obsoleted by getcwd() */
|
---|
286 | int lchown(const char *, uid_t, gid_t);
|
---|
287 | int lockf(int, int, off_t);
|
---|
288 | /** @todo int nice(int); */
|
---|
289 | /** @todo ssize_t pread(int, void *, size_t, off_t); */
|
---|
290 | /** @todo ssize_t pwrite(int, const void *, size_t, off_t); */
|
---|
291 | /** @todo int setpgrp(pid_t _pid, pid_t _pgrp); */ /* obsoleted by setpgid() */
|
---|
292 | /** @todo int setregid(gid_t, gid_t); */
|
---|
293 | /** @todo int setreuid(uid_t, uid_t); */
|
---|
294 | /* void swab(const void * __restrict, void * __restrict, ssize_t); */
|
---|
295 | void sync(void);
|
---|
296 | /** @todo useconds_t ualarm(useconds_t, useconds_t); */
|
---|
297 | int usleep(useconds_t);
|
---|
298 | /** @todo pid_t vfork(void); */
|
---|
299 |
|
---|
300 | /* See comment at ftruncate() above. */
|
---|
301 | #ifndef _TRUNCATE_DECLARED
|
---|
302 | #define _TRUNCATE_DECLARED
|
---|
303 | int truncate(const char *, off_t);
|
---|
304 | #endif
|
---|
305 | #endif /* __XSI_VISIBLE */
|
---|
306 |
|
---|
307 | #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
|
---|
308 | int brk(const void *);
|
---|
309 | int chroot(const char *);
|
---|
310 | int getdtablesize(void);
|
---|
311 | int getpagesize(void) __pure2;
|
---|
312 | char *getpass(const char *);
|
---|
313 | char *_getpass1(const char *); /* bird: emx stuff */
|
---|
314 | char *_getpass2(const char *, int); /* bird: emx stuff */
|
---|
315 | void *sbrk(intptr_t);
|
---|
316 | #endif
|
---|
317 |
|
---|
318 | #if __BSD_VISIBLE
|
---|
319 | struct timeval; /* select(2) */
|
---|
320 | /** @todo int acct(const char *); */
|
---|
321 | /** @todo int async_daemon(void); */
|
---|
322 | /** @todo int check_utility_compat(const char *); */
|
---|
323 | /** @todo const char *
|
---|
324 | crypt_get_format(void); */
|
---|
325 | /** @todo int crypt_set_format(const char *); */
|
---|
326 | /** @todo int des_cipher(const char *, char *, long, int); */
|
---|
327 | /** @todo int des_setkey(const char *key); */
|
---|
328 | void endusershell(void);
|
---|
329 | /** @todo int exect(const char *, char * const *, char * const *); */
|
---|
330 | /** @todo char *fflagstostr(u_long); */
|
---|
331 | /** @todo int getdomainname(char *, int); */
|
---|
332 | int getgrouplist(const char *, gid_t, gid_t *, int *);
|
---|
333 | /** @todo mode_t getmode(const void *, mode_t); */
|
---|
334 | /** @todo int getpeereid(int, uid_t *, gid_t *); */
|
---|
335 | /** @todo int getresgid(gid_t *, gid_t *, gid_t *); */
|
---|
336 | /** @todo int getresuid(uid_t *, uid_t *, uid_t *); */
|
---|
337 | char *getusershell(void);
|
---|
338 | int initgroups(const char *, gid_t);
|
---|
339 | /** @todo int iruserok(unsigned long, int, const char *, const char *); */
|
---|
340 | /** @todo int iruserok_sa(const void *, int, int, const char *, const char *); */
|
---|
341 | /** @todo int issetugid(void); */
|
---|
342 | /** @todo char *mkdtemp(char *); */
|
---|
343 | int mknod(const char *, mode_t, dev_t);
|
---|
344 | #ifndef _MKSTEMP_DECLARED
|
---|
345 | int mkstemp(char *);
|
---|
346 | #define _MKSTEMP_DECLARED
|
---|
347 | #endif
|
---|
348 | /** @todo int mkstemps(char *, int); */
|
---|
349 | #ifndef _MKTEMP_DECLARED
|
---|
350 | char *mktemp(char *);
|
---|
351 | #define _MKTEMP_DECLARED
|
---|
352 | #endif
|
---|
353 | /** @todo int nfsclnt(int, void *); */
|
---|
354 | /** @todo int nfssvc(int, void *); */
|
---|
355 | /** @todo int profil(char *, size_t, vm_offset_t, int); */
|
---|
356 | /** @todo int rcmd(char **, int, const char *, const char *, const char *, int *); */
|
---|
357 | /** @todo int rcmd_af(char **, int, const char *,
|
---|
358 | const char *, const char *, int *, int); */
|
---|
359 | /** @todo int rcmdsh(char **, int, const char *,
|
---|
360 | const char *, const char *, const char *); */
|
---|
361 | char *re_comp(const char *);
|
---|
362 | int re_exec(const char *);
|
---|
363 | /** @todo int reboot(int); */
|
---|
364 | /** @todo int revoke(const char *); */
|
---|
365 | /** @todo pid_t rfork(int); */
|
---|
366 | /** @todo pid_t rfork_thread(int, void *, int (*)(void *), void *); */
|
---|
367 | /** @todo int rresvport(int *); */
|
---|
368 | /** @todo int rresvport_af(int *, int); */
|
---|
369 | /** @todo int ruserok(const char *, int, const char *, const char *); */
|
---|
370 | #if __BSD_VISIBLE
|
---|
371 | #ifndef _SELECT_DECLARED
|
---|
372 | #define _SELECT_DECLARED
|
---|
373 | int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
---|
374 | #endif
|
---|
375 | #endif
|
---|
376 | /** @todo int setdomainname(const char *, int); */
|
---|
377 | int setgroups(int, const gid_t *);
|
---|
378 | /** @todo void sethostid(long); */
|
---|
379 | /** @todo int sethostname(const char *, int); */
|
---|
380 | /** @todo #ifndef _SETKEY_DECLARED */
|
---|
381 | /** @todo int setkey(const char *); */
|
---|
382 | /** @todo #define _SETKEY_DECLARED */
|
---|
383 | /** @todo #endif */
|
---|
384 | /** @todo int setlogin(const char *); */
|
---|
385 | /* crash with DOS: void *setmode(const char *); */
|
---|
386 | /** @todo int setresgid(gid_t, gid_t, gid_t); */
|
---|
387 | /** @todo int setresuid(uid_t, uid_t, uid_t); */
|
---|
388 | /** @todo int setrgid(gid_t); */
|
---|
389 | /** @todo int setruid(uid_t); */
|
---|
390 | void setusershell(void);
|
---|
391 | /** @todo int strtofflags(char **, u_long *, u_long *); */
|
---|
392 | /** @todo int swapon(const char *); */
|
---|
393 | /** @todo int swapoff(const char *); */
|
---|
394 | /** @todo int syscall(int, ...); */
|
---|
395 | /** @todo off_t __syscall(quad_t, ...); */
|
---|
396 | /** @todo int ttyslot(void); */
|
---|
397 | /** @todo int undelete(const char *); */
|
---|
398 | /** @todo int unwhiteout(const char *); */
|
---|
399 | void *valloc(size_t); /* obsoleted by malloc() */
|
---|
400 |
|
---|
401 | /** @todo extern char *suboptarg; */ /* getsubopt(3) external variable */
|
---|
402 | /** @todo #ifndef _GETSUBOPT_DECLARED */
|
---|
403 | /** @todo int getsubopt(char **, char * const *, char **); */
|
---|
404 | /** @todo #define _GETSUBOPT_DECLARED */
|
---|
405 | /** @todo #endif */
|
---|
406 | extern int optreset; /* getopt(3) external variable */
|
---|
407 | #endif /* __BSD_VISIBLE */
|
---|
408 |
|
---|
409 |
|
---|
410 | /*
|
---|
411 | * LIBC additions.
|
---|
412 | */
|
---|
413 | #ifdef __BSD_VISIBLE
|
---|
414 | char *_getcwdux(char *, size_t);
|
---|
415 | #endif
|
---|
416 |
|
---|
417 |
|
---|
418 | /*
|
---|
419 | * EMX stuff.
|
---|
420 | */
|
---|
421 | #if !defined(_POSIX_SOURCE) || defined(_WITH_UNDERSCORE)
|
---|
422 | /** @todo update this section to match the one without underscores as far as needed! */
|
---|
423 | void __exit(int) __dead2;
|
---|
424 | int _access(const char *, int);
|
---|
425 | unsigned int _alarm(unsigned int);
|
---|
426 | int _chdir(const char *);
|
---|
427 | int _chown(const char *, uid_t, gid_t);
|
---|
428 | int _close(int);
|
---|
429 | char *_cuserid(char *);
|
---|
430 | int _dup(int);
|
---|
431 | int _dup2(int, int);
|
---|
432 | int _eaccess(const char *, int);
|
---|
433 | int _execl(const char *, const char *, ...);
|
---|
434 | int _execle(const char *, const char *, ...);
|
---|
435 | int _execlp(const char *, const char *, ...);
|
---|
436 | int _execv(const char *, char * const *);
|
---|
437 | int _execve(const char *, char * const *, char * const *);
|
---|
438 | int _execvp(const char *, char * const *);
|
---|
439 | pid_t _fork(void);
|
---|
440 | long _fpathconf(int, int);
|
---|
441 | char *_getcwd(char *, size_t);
|
---|
442 | gid_t _getegid(void);
|
---|
443 | uid_t _geteuid(void);
|
---|
444 | gid_t _getgid(void);
|
---|
445 | int _getgroups(int, gid_t []);
|
---|
446 | char *_getlogin(void);
|
---|
447 | pid_t _getpgrp(void);
|
---|
448 | pid_t _getpid(void);
|
---|
449 | pid_t _getppid(void);
|
---|
450 | uid_t _getuid(void);
|
---|
451 | int _isatty(int);
|
---|
452 | int _link(const char *, const char *);
|
---|
453 | #ifndef __LSEEK_DECLARED
|
---|
454 | #define __LSEEK_DECLARED
|
---|
455 | off_t _lseek(int, off_t, int);
|
---|
456 | #endif
|
---|
457 | long _pathconf(const char *, int);
|
---|
458 | int _pause(void);
|
---|
459 | int _pipe(int *);
|
---|
460 | ssize_t _read(int, void *, size_t);
|
---|
461 | int _rmdir(const char *);
|
---|
462 | int _setgid(gid_t);
|
---|
463 | /** @todo void _setproctitle(const char *_fmt, ...) __printf0like(1, 2); */
|
---|
464 | int _setpgid(pid_t, pid_t);
|
---|
465 | pid_t _setsid(void);
|
---|
466 | int _setuid(uid_t);
|
---|
467 | unsigned _sleep(unsigned);
|
---|
468 | long _sysconf(int);
|
---|
469 | pid_t _tcgetpgrp(int);
|
---|
470 | pid_t _tcsetpgrp(int, int);
|
---|
471 | char *_ttyname(int);
|
---|
472 | int _unlink(const char *);
|
---|
473 | int _write(int, const void *, size_t);
|
---|
474 |
|
---|
475 | int _brk(const void *);
|
---|
476 | char *_getpass(const char *);
|
---|
477 | char *_getpass1(const char *);
|
---|
478 | char *_getpass2(const char *, int);
|
---|
479 | int _mkstemp(char *);
|
---|
480 | char *_mktemp(char *);
|
---|
481 | void *_sbrk(intptr_t);
|
---|
482 | /** @todo int _profil(void *, unsigned, unsigned, unsigned); */
|
---|
483 |
|
---|
484 | /* 1003.2-1992 */
|
---|
485 | extern char *_optarg;
|
---|
486 | extern int _optind;
|
---|
487 | extern int _opterr;
|
---|
488 | extern int _optopt;
|
---|
489 | int _getopt(int, char **, const char *);
|
---|
490 |
|
---|
491 | #endif
|
---|
492 |
|
---|
493 | /* Toolkit compatibility */
|
---|
494 | #ifndef TCPCALL
|
---|
495 | #define TCPCALL _System
|
---|
496 | #endif
|
---|
497 |
|
---|
498 | #include <sys/cdefs.h>
|
---|
499 | #include <sys/types.h>
|
---|
500 | int TCPCALL soclose(int);
|
---|
501 | #ifndef _POSIX_SOURCE
|
---|
502 | int TCPCALL gethostid(void);
|
---|
503 | int TCPCALL gethostname(char *, int);
|
---|
504 | #ifndef TCPV40HDRS
|
---|
505 | int TCPCALL iruserok(unsigned long, int, const char *, const char *);
|
---|
506 | int TCPCALL rcmd(char **, int, const char *, const char *, const char *, int *);
|
---|
507 | int TCPCALL rresvport(int *);
|
---|
508 | int TCPCALL ruserok(const char *, int, const char *, const char *);
|
---|
509 | #include <sys/select.h>
|
---|
510 | #endif /* !TCP40HDRS */
|
---|
511 | #endif /* !_POSIX_SOURCE */
|
---|
512 |
|
---|
513 | __END_DECLS
|
---|
514 |
|
---|
515 | #endif /* not _UNISTD_H */
|
---|