|
1 /*- |
|
2 * Copyright (c) 1991, 1993, 1994 |
|
3 * The Regents of the University of California. All rights reserved. |
|
4 * |
|
5 * Redistribution and use in source and binary forms, with or without |
|
6 * modification, are permitted provided that the following conditions |
|
7 * are met: |
|
8 * 1. Redistributions of source code must retain the above copyright |
|
9 * notice, this list of conditions and the following disclaimer. |
|
10 * 2. Redistributions in binary form must reproduce the above copyright |
|
11 * notice, this list of conditions and the following disclaimer in the |
|
12 * documentation and/or other materials provided with the distribution. |
|
13 * 4. Neither the name of the University nor the names of its contributors |
|
14 * may be used to endorse or promote products derived from this software |
|
15 * without specific prior written permission. |
|
16 * |
|
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
|
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
|
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
|
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
27 * SUCH DAMAGE. |
|
28 * |
|
29 * Portions Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
30 * @(#)unistd.h 8.12 (Berkeley) 4/27/95 |
|
31 * $FreeBSD: src/include/unistd.h,v 1.78 2005/05/13 16:27:30 delphij Exp $ |
|
32 */ |
|
33 |
|
34 #ifndef _UNISTD_H_ |
|
35 #define _UNISTD_H_ |
|
36 |
|
37 //--- |
|
38 #ifdef __cplusplus |
|
39 #include <e32def.h> |
|
40 |
|
41 extern "C" { |
|
42 #endif |
|
43 |
|
44 //--- |
|
45 |
|
46 #include <sys/cdefs.h> |
|
47 #include <sys/types.h> /* XXX adds too much pollution. */ |
|
48 #include <sys/unistd.h> |
|
49 #include <sys/_null.h> |
|
50 #include <sys/_types.h> |
|
51 |
|
52 #ifdef __SYMBIAN32__ |
|
53 #include <_ansi.h> |
|
54 #endif //__SYMBIAN32__ |
|
55 |
|
56 #ifdef __SYMBIAN32__ |
|
57 __BEGIN_DECLS |
|
58 IMPORT_C char ***__environ(void); |
|
59 __END_DECLS |
|
60 #define environ (*__environ()) |
|
61 #endif //__SYMBIAN32__ |
|
62 |
|
63 #ifndef _GID_T_DECLARED |
|
64 typedef __gid_t gid_t; |
|
65 #define _GID_T_DECLARED |
|
66 #endif |
|
67 |
|
68 #ifndef _OFF_T_DECLARED |
|
69 typedef __off_t off_t; |
|
70 #define _OFF_T_DECLARED |
|
71 #endif |
|
72 |
|
73 #ifndef _PID_T_DECLARED |
|
74 typedef __pid_t pid_t; |
|
75 #define _PID_T_DECLARED |
|
76 #endif |
|
77 |
|
78 #ifndef _SIZE_T_DECLARED |
|
79 typedef __size_t size_t; |
|
80 #define _SIZE_T_DECLARED |
|
81 #endif |
|
82 |
|
83 #ifndef _SSIZE_T_DECLARED |
|
84 typedef __ssize_t ssize_t; |
|
85 #define _SSIZE_T_DECLARED |
|
86 #endif |
|
87 |
|
88 #ifndef _UID_T_DECLARED |
|
89 typedef __uid_t uid_t; |
|
90 #define _UID_T_DECLARED |
|
91 #endif |
|
92 |
|
93 #ifndef _USECONDS_T_DECLARED |
|
94 typedef __useconds_t useconds_t; |
|
95 #define _USECONDS_T_DECLARED |
|
96 #endif |
|
97 |
|
98 #define STDIN_FILENO 0 /* standard input file descriptor */ |
|
99 #define STDOUT_FILENO 1 /* standard output file descriptor */ |
|
100 #define STDERR_FILENO 2 /* standard error file descriptor */ |
|
101 |
|
102 #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 |
|
103 #define F_ULOCK 0 /* unlock locked section */ |
|
104 #define F_LOCK 1 /* lock a section for exclusive use */ |
|
105 #define F_TLOCK 2 /* test and lock a section for exclusive use */ |
|
106 #define F_TEST 3 /* test a section for locks by other procs */ |
|
107 #endif |
|
108 |
|
109 /* |
|
110 * POSIX options and option groups we unconditionally do or don't |
|
111 * implement. This list includes those options which are exclusively |
|
112 * implemented (or not) in user mode. Please keep this list in |
|
113 * alphabetical order. |
|
114 * |
|
115 * Anything which is defined as zero below **must** have an |
|
116 * implementation for the corresponding sysconf() which is able to |
|
117 * determine conclusively whether or not the feature is supported. |
|
118 * Anything which is defined as other than -1 below **must** have |
|
119 * complete headers, types, and function declarations as specified by |
|
120 * the POSIX standard; however, if the relevant sysconf() function |
|
121 * returns -1, the functions may be stubbed out. |
|
122 */ |
|
123 #define _POSIX_BARRIERS -1 |
|
124 #define _POSIX_READER_WRITER_LOCKS -1 |
|
125 #define _POSIX_REGEXP 1 |
|
126 #define _POSIX_SHELL 1 |
|
127 #define _POSIX_SPAWN -1 |
|
128 #define _POSIX_SPIN_LOCKS -1 |
|
129 #define _POSIX_THREAD_ATTR_STACKADDR -1 |
|
130 #define _POSIX_THREAD_ATTR_STACKSIZE 200112L |
|
131 #define _POSIX_THREAD_CPUTIME -1 |
|
132 #define _POSIX_THREAD_PRIO_INHERIT -1 |
|
133 #define _POSIX_THREAD_PRIO_PROTECT -1 |
|
134 #define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L |
|
135 #define _POSIX_THREAD_PROCESS_SHARED -1 |
|
136 #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L |
|
137 #define _POSIX_THREAD_SPORADIC_SERVER -1 |
|
138 #define _POSIX_THREADS 200112L |
|
139 #define _POSIX_TRACE -1 |
|
140 #define _POSIX_TRACE_EVENT_FILTER -1 |
|
141 #define _POSIX_TRACE_INHERIT -1 |
|
142 #define _POSIX_TRACE_LOG -1 |
|
143 #define _POSIX2_C_BIND 200112L /* mandatory */ |
|
144 #define _POSIX2_C_DEV -1 /* need c99 utility */ |
|
145 #define _POSIX2_CHAR_TERM 1 |
|
146 #define _POSIX2_FORT_DEV -1 /* need fort77 utility */ |
|
147 #define _POSIX2_FORT_RUN 200112L |
|
148 #define _POSIX2_LOCALEDEF -1 |
|
149 #define _POSIX2_PBS -1 |
|
150 #define _POSIX2_PBS_ACCOUNTING -1 |
|
151 #define _POSIX2_PBS_CHECKPOINT -1 |
|
152 #define _POSIX2_PBS_LOCATE -1 |
|
153 #define _POSIX2_PBS_MESSAGE -1 |
|
154 #define _POSIX2_PBS_TRACK -1 |
|
155 #define _POSIX2_SW_DEV -1 /* XXX ??? */ |
|
156 #define _POSIX2_UPE 200112L |
|
157 #define _V6_ILP32_OFF32 -1 |
|
158 #define _V6_ILP32_OFFBIG 0 |
|
159 #define _V6_LP64_OFF64 0 |
|
160 #define _V6_LPBIG_OFFBIG -1 |
|
161 |
|
162 #if __XSI_VISIBLE |
|
163 #define _XOPEN_CRYPT -1 /* XXX ??? */ |
|
164 #define _XOPEN_ENH_I18N -1 /* mandatory in XSI */ |
|
165 #define _XOPEN_LEGACY -1 |
|
166 #define _XOPEN_REALTIME -1 |
|
167 #define _XOPEN_REALTIME_THREADS -1 |
|
168 #define _XOPEN_UNIX -1 |
|
169 #endif |
|
170 |
|
171 /* Define the POSIX.2 version we target for compliance. */ |
|
172 #define _POSIX2_VERSION 199212L |
|
173 |
|
174 /* |
|
175 * POSIX-style system configuration variable accessors (for the |
|
176 * sysconf function). The kernel does not directly implement the |
|
177 * sysconf() interface; rather, a C library stub translates references |
|
178 * to sysconf() into calls to sysctl() using a giant switch statement. |
|
179 * Those that are marked `user' are implemented entirely in the C |
|
180 * library and never query the kernel. pathconf() is implemented |
|
181 * directly by the kernel so those are not defined here. |
|
182 */ |
|
183 #define _SC_ARG_MAX 1 |
|
184 #define _SC_CHILD_MAX 2 |
|
185 #define _SC_CLK_TCK 3 |
|
186 #define _SC_NGROUPS_MAX 4 |
|
187 #define _SC_OPEN_MAX 5 |
|
188 #define _SC_JOB_CONTROL 6 |
|
189 #define _SC_SAVED_IDS 7 |
|
190 #define _SC_VERSION 8 |
|
191 #define _SC_BC_BASE_MAX 9 /* user */ |
|
192 #define _SC_BC_DIM_MAX 10 /* user */ |
|
193 #define _SC_BC_SCALE_MAX 11 /* user */ |
|
194 #define _SC_BC_STRING_MAX 12 /* user */ |
|
195 #define _SC_COLL_WEIGHTS_MAX 13 /* user */ |
|
196 #define _SC_EXPR_NEST_MAX 14 /* user */ |
|
197 #define _SC_LINE_MAX 15 /* user */ |
|
198 #define _SC_RE_DUP_MAX 16 /* user */ |
|
199 #define _SC_2_VERSION 17 /* user */ |
|
200 #define _SC_2_C_BIND 18 /* user */ |
|
201 #define _SC_2_C_DEV 19 /* user */ |
|
202 #define _SC_2_CHAR_TERM 20 /* user */ |
|
203 #define _SC_2_FORT_DEV 21 /* user */ |
|
204 #define _SC_2_FORT_RUN 22 /* user */ |
|
205 #define _SC_2_LOCALEDEF 23 /* user */ |
|
206 #define _SC_2_SW_DEV 24 /* user */ |
|
207 #define _SC_2_UPE 25 /* user */ |
|
208 #define _SC_STREAM_MAX 26 /* user */ |
|
209 #define _SC_TZNAME_MAX 27 /* user */ |
|
210 |
|
211 #if __POSIX_VISIBLE >= 199309 |
|
212 #define _SC_ASYNCHRONOUS_IO 28 |
|
213 #define _SC_MAPPED_FILES 29 |
|
214 #define _SC_MEMLOCK 30 |
|
215 #define _SC_MEMLOCK_RANGE 31 |
|
216 #define _SC_MEMORY_PROTECTION 32 |
|
217 #define _SC_MESSAGE_PASSING 33 |
|
218 #define _SC_PRIORITIZED_IO 34 |
|
219 #define _SC_PRIORITY_SCHEDULING 35 |
|
220 #define _SC_REALTIME_SIGNALS 36 |
|
221 #define _SC_SEMAPHORES 37 |
|
222 #define _SC_FSYNC 38 |
|
223 #define _SC_SHARED_MEMORY_OBJECTS 39 |
|
224 #define _SC_SYNCHRONIZED_IO 40 |
|
225 #define _SC_TIMERS 41 |
|
226 #define _SC_AIO_LISTIO_MAX 42 |
|
227 #define _SC_AIO_MAX 43 |
|
228 #define _SC_AIO_PRIO_DELTA_MAX 44 |
|
229 #define _SC_DELAYTIMER_MAX 45 |
|
230 #define _SC_MQ_OPEN_MAX 46 |
|
231 #define _SC_PAGESIZE 47 |
|
232 #define _SC_RTSIG_MAX 48 |
|
233 #define _SC_SEM_NSEMS_MAX 49 |
|
234 #define _SC_SEM_VALUE_MAX 50 |
|
235 #define _SC_SIGQUEUE_MAX 51 |
|
236 #define _SC_TIMER_MAX 52 |
|
237 #endif |
|
238 |
|
239 #if __POSIX_VISIBLE >= 200112 |
|
240 #define _SC_2_PBS 59 /* user */ |
|
241 #define _SC_2_PBS_ACCOUNTING 60 /* user */ |
|
242 #define _SC_2_PBS_CHECKPOINT 61 /* user */ |
|
243 #define _SC_2_PBS_LOCATE 62 /* user */ |
|
244 #define _SC_2_PBS_MESSAGE 63 /* user */ |
|
245 #define _SC_2_PBS_TRACK 64 /* user */ |
|
246 #define _SC_ADVISORY_INFO 65 |
|
247 #define _SC_BARRIERS 66 /* user */ |
|
248 #define _SC_CLOCK_SELECTION 67 |
|
249 #define _SC_CPUTIME 68 |
|
250 #define _SC_FILE_LOCKING 69 |
|
251 #define _SC_GETGR_R_SIZE_MAX 70 /* user */ |
|
252 #define _SC_GETPW_R_SIZE_MAX 71 /* user */ |
|
253 #define _SC_HOST_NAME_MAX 72 |
|
254 #define _SC_LOGIN_NAME_MAX 73 |
|
255 #define _SC_MONOTONIC_CLOCK 74 |
|
256 #define _SC_MQ_PRIO_MAX 75 |
|
257 #define _SC_READER_WRITER_LOCKS 76 /* user */ |
|
258 #define _SC_REGEXP 77 /* user */ |
|
259 #define _SC_SHELL 78 /* user */ |
|
260 #define _SC_SPAWN 79 /* user */ |
|
261 #define _SC_SPIN_LOCKS 80 /* user */ |
|
262 #define _SC_SPORADIC_SERVER 81 |
|
263 #define _SC_THREAD_ATTR_STACKADDR 82 /* user */ |
|
264 #define _SC_THREAD_ATTR_STACKSIZE 83 /* user */ |
|
265 #define _SC_THREAD_CPUTIME 84 /* user */ |
|
266 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */ |
|
267 #define _SC_THREAD_KEYS_MAX 86 /* user */ |
|
268 #define _SC_THREAD_PRIO_INHERIT 87 /* user */ |
|
269 #define _SC_THREAD_PRIO_PROTECT 88 /* user */ |
|
270 #define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */ |
|
271 #define _SC_THREAD_PROCESS_SHARED 90 /* user */ |
|
272 #define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */ |
|
273 #define _SC_THREAD_SPORADIC_SERVER 92 /* user */ |
|
274 #define _SC_THREAD_STACK_MIN 93 /* user */ |
|
275 #define _SC_THREAD_THREADS_MAX 94 /* user */ |
|
276 #define _SC_TIMEOUTS 95 /* user */ |
|
277 #define _SC_THREADS 96 /* user */ |
|
278 #define _SC_TRACE 97 /* user */ |
|
279 #define _SC_TRACE_EVENT_FILTER 98 /* user */ |
|
280 #define _SC_TRACE_INHERIT 99 /* user */ |
|
281 #define _SC_TRACE_LOG 100 /* user */ |
|
282 #define _SC_TTY_NAME_MAX 101 /* user */ |
|
283 #define _SC_TYPED_MEMORY_OBJECTS 102 |
|
284 #define _SC_V6_ILP32_OFF32 103 /* user */ |
|
285 #define _SC_V6_ILP32_OFFBIG 104 /* user */ |
|
286 #define _SC_V6_LP64_OFF64 105 /* user */ |
|
287 #define _SC_V6_LPBIG_OFFBIG 106 /* user */ |
|
288 #define _SC_IPV6 118 |
|
289 #define _SC_RAW_SOCKETS 119 |
|
290 #define _SC_SYMLOOP_MAX 120 |
|
291 #endif |
|
292 |
|
293 #if __XSI_VISIBLE |
|
294 #define _SC_ATEXIT_MAX 107 /* user */ |
|
295 #define _SC_IOV_MAX 56 |
|
296 #define _SC_PAGE_SIZE _SC_PAGESIZE |
|
297 #define _SC_XOPEN_CRYPT 108 /* user */ |
|
298 #define _SC_XOPEN_ENH_I18N 109 /* user */ |
|
299 #define _SC_XOPEN_LEGACY 110 /* user */ |
|
300 #define _SC_XOPEN_REALTIME 111 |
|
301 #define _SC_XOPEN_REALTIME_THREADS 112 |
|
302 #define _SC_XOPEN_SHM 113 |
|
303 #define _SC_XOPEN_STREAMS 114 |
|
304 #define _SC_XOPEN_UNIX 115 |
|
305 #define _SC_XOPEN_VERSION 116 |
|
306 #define _SC_XOPEN_XCU_VERSION 117 /* user */ |
|
307 #endif |
|
308 |
|
309 #if __BSD_VISIBLE |
|
310 #define _SC_NPROCESSORS_CONF 57 |
|
311 #define _SC_NPROCESSORS_ONLN 58 |
|
312 #endif |
|
313 |
|
314 /* Keys for the confstr(3) function. */ |
|
315 #if __POSIX_VISIBLE >= 199209 |
|
316 #define _CS_PATH 1 /* default value of PATH */ |
|
317 #endif |
|
318 |
|
319 #if __POSIX_VISIBLE >= 200112 |
|
320 #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 |
|
321 #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 |
|
322 #define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 |
|
323 #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 |
|
324 #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 |
|
325 #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 |
|
326 #define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 |
|
327 #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 |
|
328 #define _CS_POSIX_V6_LP64_OFF64_LIBS 10 |
|
329 #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 |
|
330 #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 |
|
331 #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 |
|
332 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 |
|
333 #endif |
|
334 |
|
335 __BEGIN_DECLS |
|
336 /* 1003.1-1990 */ |
|
337 IMPORT_C void _exit(int) __dead2; |
|
338 IMPORT_C int access(const char *, int); |
|
339 IMPORT_C int chdir(const char *); |
|
340 IMPORT_C int chown(const char *, uid_t, gid_t); |
|
341 IMPORT_C int close(int); |
|
342 IMPORT_C int dup(int); |
|
343 IMPORT_C int dup2(int, int); |
|
344 int eaccess(const char *, int); |
|
345 IMPORT_C long fpathconf(int, int); |
|
346 IMPORT_C char *getcwd(char *, size_t); |
|
347 IMPORT_C gid_t getegid(void); |
|
348 IMPORT_C uid_t geteuid(void); |
|
349 IMPORT_C gid_t getgid(void); |
|
350 IMPORT_C int getgroups(int, gid_t []); |
|
351 char *getlogin(void); |
|
352 IMPORT_C pid_t getpgrp(void); |
|
353 IMPORT_C pid_t getpid(void); |
|
354 IMPORT_C pid_t getppid(void); |
|
355 IMPORT_C uid_t getuid(void); |
|
356 IMPORT_C int isatty(int); |
|
357 IMPORT_C int link(const char *, const char *); |
|
358 #ifndef _LSEEK_DECLARED |
|
359 #define _LSEEK_DECLARED |
|
360 IMPORT_C off_t lseek(int, off_t, int); |
|
361 |
|
362 #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) |
|
363 #define lseek64 lseek |
|
364 #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ |
|
365 |
|
366 #endif |
|
367 IMPORT_C long pathconf(const char *, int); |
|
368 IMPORT_C int pipe(int *); |
|
369 IMPORT_C ssize_t read(int, void *, size_t); |
|
370 IMPORT_C int rmdir(const char *); |
|
371 IMPORT_C int setgid(gid_t); |
|
372 IMPORT_C int setpgid(pid_t, pid_t); |
|
373 void setproctitle(const char *_fmt, ...) __printf0like(1, 2); |
|
374 IMPORT_C pid_t setsid(void); |
|
375 IMPORT_C int setuid(uid_t); |
|
376 IMPORT_C unsigned int sleep(unsigned int); |
|
377 IMPORT_C |
|
378 long sysconf(int); |
|
379 IMPORT_C int unlink(const char *); |
|
380 IMPORT_C ssize_t write(int, const void *, size_t); |
|
381 /* 1003.2-1992 */ |
|
382 #if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE |
|
383 IMPORT_C size_t confstr(int, char *, size_t); |
|
384 #ifndef _GETOPT_DECLARED |
|
385 #define _GETOPT_DECLARED |
|
386 IMPORT_C int getopt(int, char * const [], const char *); |
|
387 |
|
388 #ifndef __SYMBIAN32__ |
|
389 extern char *optarg; /* getopt(3) external variables */ |
|
390 extern int optind, opterr, optopt; |
|
391 #else |
|
392 IMPORT_C int *__optopt(void); |
|
393 IMPORT_C int *__opterr(void); |
|
394 IMPORT_C int *__optind(void); |
|
395 IMPORT_C char **__optarg(void); |
|
396 #define optopt (*__optopt()) |
|
397 #define opterr (*__opterr()) |
|
398 #define optind (*__optind()) |
|
399 #define optarg (*__optarg()) |
|
400 #endif /* __SYMBIAN32__ */ |
|
401 |
|
402 #endif /* _GETOPT_DECLARED */ |
|
403 #endif |
|
404 |
|
405 /* ISO/IEC 9945-1: 1996 */ |
|
406 #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE |
|
407 IMPORT_C int fsync(int); |
|
408 IMPORT_C int fdatasync(int); |
|
409 /* |
|
410 * ftruncate() was in the POSIX Realtime Extension (it's used for shared |
|
411 * memory), but truncate() was not. |
|
412 */ |
|
413 #ifndef _FTRUNCATE_DECLARED |
|
414 #define _FTRUNCATE_DECLARED |
|
415 IMPORT_C int ftruncate(int, off_t); |
|
416 |
|
417 #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) |
|
418 #define ftruncate64 ftruncate |
|
419 #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ |
|
420 |
|
421 #endif |
|
422 #endif |
|
423 |
|
424 #if __POSIX_VISIBLE >= 199506 |
|
425 |
|
426 #ifndef __SYMBIAN32__ |
|
427 int getlogin_r(char *, int); |
|
428 #endif //__SYMBIAN32__ |
|
429 |
|
430 #endif |
|
431 |
|
432 /* 1003.1-2001 */ |
|
433 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE |
|
434 IMPORT_C int readlink(const char *, char *, int); |
|
435 #endif |
|
436 #if __POSIX_VISIBLE >= 200112 |
|
437 IMPORT_C int gethostname(char *, size_t); |
|
438 IMPORT_C int setegid(gid_t); |
|
439 IMPORT_C int seteuid(uid_t); |
|
440 #endif |
|
441 |
|
442 /* |
|
443 * symlink() was originally in POSIX.1a, which was withdrawn after |
|
444 * being overtaken by events (1003.1-2001). It was in XPG4.2, and of |
|
445 * course has been in BSD since 4.2. |
|
446 */ |
|
447 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE |
|
448 IMPORT_C int symlink(const char * __restrict, const char * __restrict); |
|
449 #endif |
|
450 |
|
451 /* X/Open System Interfaces */ |
|
452 #if __XSI_VISIBLE |
|
453 char *crypt(const char *, const char *); |
|
454 /* char *ctermid(char *); */ /* XXX ??? */ |
|
455 int encrypt(char *, int); |
|
456 IMPORT_C int fchdir(int); |
|
457 IMPORT_C int getpgid(pid_t _pid); |
|
458 IMPORT_C int lchown(const char *, uid_t, gid_t); |
|
459 IMPORT_C int nice(int); |
|
460 IMPORT_C int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */ |
|
461 IMPORT_C int setregid(gid_t, gid_t); |
|
462 IMPORT_C int setreuid(uid_t, uid_t); |
|
463 |
|
464 #ifndef _SWAB_DECLARED |
|
465 #define _SWAB_DECLARED |
|
466 IMPORT_C |
|
467 void swab(const void * __restrict, void * __restrict, ssize_t); |
|
468 #endif /* _SWAB_DECLARED */ |
|
469 |
|
470 void sync(void); |
|
471 IMPORT_C int usleep(useconds_t); |
|
472 |
|
473 IMPORT_C unsigned int alarm(unsigned int seconds); |
|
474 |
|
475 /* See comment at ftruncate() above. */ |
|
476 #ifndef _TRUNCATE_DECLARED |
|
477 #define _TRUNCATE_DECLARED |
|
478 IMPORT_C int truncate(const char *, off_t); |
|
479 |
|
480 #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) |
|
481 #define truncate64 truncate |
|
482 #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ |
|
483 |
|
484 #endif |
|
485 #endif /* __XSI_VISIBLE */ |
|
486 |
|
487 #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE |
|
488 IMPORT_C int brk(const void *); |
|
489 IMPORT_C int getdtablesize(void); |
|
490 IMPORT_C int getpagesize(void) __pure2; |
|
491 #endif |
|
492 |
|
493 #if __BSD_VISIBLE |
|
494 struct timeval; /* select(2) */ |
|
495 IMPORT_C int initgroups(const char *, gid_t); |
|
496 IMPORT_C int issetugid(void); |
|
497 |
|
498 #ifdef __SYMBIAN_COMPILE_UNUSED__ |
|
499 char *mkdtemp(char *); |
|
500 #endif |
|
501 |
|
502 #ifndef _MKNOD_DECLARED |
|
503 int mknod(const char *, mode_t, dev_t); |
|
504 #define _MKNOD_DECLARED |
|
505 #endif |
|
506 #ifndef _MKSTEMP_DECLARED |
|
507 IMPORT_C int mkstemp(char *); |
|
508 |
|
509 #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) |
|
510 #define mkstemp64 mkstemp |
|
511 #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ |
|
512 |
|
513 #define _MKSTEMP_DECLARED |
|
514 #endif |
|
515 |
|
516 #ifdef __SYMBIAN_COMPILE_UNUSED__ |
|
517 int mkstemps(char *, int); |
|
518 #endif |
|
519 |
|
520 #ifndef _MKTEMP_DECLARED |
|
521 |
|
522 #ifdef __SYMBIAN_COMPILE_UNUSED__ |
|
523 char *mktemp(char *); |
|
524 #endif |
|
525 |
|
526 #define _MKTEMP_DECLARED |
|
527 #endif |
|
528 int nfssvc(int, void *); |
|
529 |
|
530 #if __BSD_VISIBLE |
|
531 #ifndef __SYMBIAN32__ |
|
532 #ifndef _SELECT_DECLARED |
|
533 #define _SELECT_DECLARED |
|
534 IMPORT_C int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); |
|
535 #endif // _SELECT_DECLARED |
|
536 #endif // __SYMBIAN32__ |
|
537 #endif // __BSD_VISIBLE |
|
538 |
|
539 IMPORT_C int setgroups(int, const gid_t *); |
|
540 #ifndef _SETKEY_DECLARED |
|
541 int setkey(const char *); |
|
542 #define _SETKEY_DECLARED |
|
543 #endif |
|
544 |
|
545 #ifndef _OPTRESET_DECLARED |
|
546 #define _OPTRESET_DECLARED |
|
547 #ifndef __SYMBIAN32__ |
|
548 extern int optreset; /* getopt(3) external variable */ |
|
549 #else |
|
550 IMPORT_C int *__optreset(void); |
|
551 #define optreset (*__optreset()) |
|
552 #endif /* __SYMBIAN32__ */ |
|
553 |
|
554 #ifdef __SYMBIAN32__ |
|
555 #ifndef __XSI_VISIBLE |
|
556 void encrypt(char block[], int edflag); |
|
557 char *crypt(const char *key, const char *salt); |
|
558 #endif /* ifdef __SYMBIAN32__ */ |
|
559 #endif /* ifndef __XSI_VISIBLE */ |
|
560 |
|
561 #endif /* _OPTRESET_DECLARED */ |
|
562 #endif /* __BSD_VISIBLE */ |
|
563 __END_DECLS |
|
564 |
|
565 //--- |
|
566 #ifdef __cplusplus |
|
567 } |
|
568 #endif |
|
569 //--- |
|
570 |
|
571 #endif /* !_UNISTD_H_ */ |