unistd.h

Go to the documentation of this file.
00001 /*-
00002  * © Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
00003  * © Portions copyright (c) 2006 Symbian Software Ltd. All rights reserved.
00004  * Copyright (c) 1991, 1993, 1994
00005  *      The Regents of the University of California.  All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer.
00012  * 2. Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  * 3. All advertising materials mentioning features or use of this software
00016  *    must display the following acknowledgement:
00017  *      This product includes software developed by the University of
00018  *      California, Berkeley and its contributors.
00019  * 4. Neither the name of the University nor the names of its contributors
00020  *    may be used to endorse or promote products derived from this software
00021  *    without specific prior written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00024  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00025  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00026  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00027  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00028  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00029  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00030  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00031  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00032  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00033  * SUCH DAMAGE.
00034  *
00035  *      @(#)unistd.h    8.12 (Berkeley) 4/27/95
00036  * $FreeBSD: src/include/unistd.h,v 1.78 2005/05/13 16:27:30 delphij Exp $
00037  */
00038 
00039 #ifndef _UNISTD_H_
00040 #define _UNISTD_H_
00041 
00042 //---
00043 #ifdef __cplusplus
00044 #include <e32def.h>
00045 
00046 extern "C" {
00047 #endif
00048 
00049 //---
00050 
00051 #include <sys/cdefs.h>
00052 #include <sys/types.h>                  /* XXX adds too much pollution. */
00053 #include <sys/unistd.h>
00054 #include <sys/_null.h>
00055 #include <sys/_types.h>
00056 
00057 #ifdef __SYMBIAN32__
00058 #include <_ansi.h>
00059 //__SYMBIAN32__
00060 #endif
00061 
00062 #ifdef __SYMBIAN32__
00063 __BEGIN_DECLS
00064 IMPORT_C char ***__environ(void);
00065 __END_DECLS
00066 #define environ   (*__environ())
00067 //__SYMBIAN32__
00068 #endif
00069 
00070 #ifndef _GID_T_DECLARED
00071 typedef __gid_t         gid_t;
00072 #define _GID_T_DECLARED
00073 #endif
00074 
00075 #ifndef _OFF_T_DECLARED
00076 typedef __off_t         off_t;
00077 #define _OFF_T_DECLARED
00078 #endif
00079 
00080 #ifndef _PID_T_DECLARED
00081 typedef __pid_t         pid_t;
00082 #define _PID_T_DECLARED
00083 #endif
00084 
00085 #ifndef _SIZE_T_DECLARED
00086 typedef __size_t        size_t;
00087 #define _SIZE_T_DECLARED
00088 #endif
00089 
00090 #ifndef _SSIZE_T_DECLARED
00091 typedef __ssize_t       ssize_t;
00092 #define _SSIZE_T_DECLARED
00093 #endif
00094 
00095 #ifndef _UID_T_DECLARED
00096 typedef __uid_t         uid_t;
00097 #define _UID_T_DECLARED
00098 #endif
00099 
00100 #ifndef _USECONDS_T_DECLARED
00101 typedef __useconds_t    useconds_t;
00102 #define _USECONDS_T_DECLARED
00103 #endif
00104 
00105 #define  STDIN_FILENO   0       /* standard input file descriptor */
00106 #define STDOUT_FILENO   1       /* standard output file descriptor */
00107 #define STDERR_FILENO   2       /* standard error file descriptor */
00108 
00109 #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
00110 #define F_ULOCK         0       /* unlock locked section */
00111 #define F_LOCK          1       /* lock a section for exclusive use */
00112 #define F_TLOCK         2       /* test and lock a section for exclusive use */
00113 #define F_TEST          3       /* test a section for locks by other procs */
00114 #endif
00115 
00116 /*
00117  * POSIX options and option groups we unconditionally do or don't
00118  * implement.  This list includes those options which are exclusively
00119  * implemented (or not) in user mode.  Please keep this list in
00120  * alphabetical order.
00121  *
00122  * Anything which is defined as zero below **must** have an
00123  * implementation for the corresponding sysconf() which is able to
00124  * determine conclusively whether or not the feature is supported.
00125  * Anything which is defined as other than -1 below **must** have
00126  * complete headers, types, and function declarations as specified by
00127  * the POSIX standard; however, if the relevant sysconf() function
00128  * returns -1, the functions may be stubbed out.
00129  */
00130 #define _POSIX_BARRIERS                 -1
00131 #define _POSIX_READER_WRITER_LOCKS -1   
00132 #define _POSIX_REGEXP                   1
00133 #define _POSIX_SHELL                    1
00134 #define _POSIX_SPAWN                    -1
00135 #define _POSIX_SPIN_LOCKS               -1
00136 #define _POSIX_THREAD_ATTR_STACKADDR -1 
00137 #define _POSIX_THREAD_ATTR_STACKSIZE    200112L
00138 #define _POSIX_THREAD_CPUTIME           -1
00139 #define _POSIX_THREAD_PRIO_INHERIT -1   
00140 #define _POSIX_THREAD_PRIO_PROTECT -1   
00141 #define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L
00142 #define _POSIX_THREAD_PROCESS_SHARED    -1
00143 #define _POSIX_THREAD_SAFE_FUNCTIONS    200112L
00144 #define _POSIX_THREAD_SPORADIC_SERVER   -1
00145 #define _POSIX_THREADS                  200112L
00146 #define _POSIX_TRACE                    -1
00147 #define _POSIX_TRACE_EVENT_FILTER       -1
00148 #define _POSIX_TRACE_INHERIT            -1
00149 #define _POSIX_TRACE_LOG                -1
00150 #define _POSIX2_C_BIND                  200112L /* mandatory */
00151 #define _POSIX2_C_DEV                   -1 /* need c99 utility */
00152 #define _POSIX2_CHAR_TERM               1
00153 #define _POSIX2_FORT_DEV                -1 /* need fort77 utility */
00154 #define _POSIX2_FORT_RUN                200112L
00155 #define _POSIX2_LOCALEDEF               -1
00156 #define _POSIX2_PBS                     -1
00157 #define _POSIX2_PBS_ACCOUNTING          -1
00158 #define _POSIX2_PBS_CHECKPOINT          -1
00159 #define _POSIX2_PBS_LOCATE              -1
00160 #define _POSIX2_PBS_MESSAGE             -1
00161 #define _POSIX2_PBS_TRACK               -1
00162 #define _POSIX2_SW_DEV                  -1 /* XXX ??? */
00163 #define _POSIX2_UPE                     200112L
00164 #define _V6_ILP32_OFF32                 -1
00165 #define _V6_ILP32_OFFBIG                0
00166 #define _V6_LP64_OFF64                  0
00167 #define _V6_LPBIG_OFFBIG                -1
00168 
00169 #if __XSI_VISIBLE
00170 #define _XOPEN_CRYPT                    -1 /* XXX ??? */
00171 #define _XOPEN_ENH_I18N                 -1 /* mandatory in XSI */
00172 #define _XOPEN_LEGACY                   -1
00173 #define _XOPEN_REALTIME                 -1
00174 #define _XOPEN_REALTIME_THREADS         -1
00175 #define _XOPEN_UNIX                     -1
00176 #endif
00177 
00178 /* Define the POSIX.2 version we target for compliance. */
00179 #define _POSIX2_VERSION         199212L
00180 
00181 /*
00182  * POSIX-style system configuration variable accessors (for the
00183  * sysconf function).  The kernel does not directly implement the
00184  * sysconf() interface; rather, a C library stub translates references
00185  * to sysconf() into calls to sysctl() using a giant switch statement.
00186  * Those that are marked `user' are implemented entirely in the C
00187  * library and never query the kernel.  pathconf() is implemented
00188  * directly by the kernel so those are not defined here.
00189  */
00190 #define _SC_ARG_MAX              1
00191 #define _SC_CHILD_MAX            2
00192 #define _SC_CLK_TCK              3
00193 #define _SC_NGROUPS_MAX          4
00194 #define _SC_OPEN_MAX             5
00195 #define _SC_JOB_CONTROL          6
00196 #define _SC_SAVED_IDS            7
00197 #define _SC_VERSION              8
00198 #define _SC_BC_BASE_MAX          9 /* user */
00199 #define _SC_BC_DIM_MAX          10 /* user */
00200 #define _SC_BC_SCALE_MAX        11 /* user */
00201 #define _SC_BC_STRING_MAX       12 /* user */
00202 #define _SC_COLL_WEIGHTS_MAX    13 /* user */
00203 #define _SC_EXPR_NEST_MAX       14 /* user */
00204 #define _SC_LINE_MAX            15 /* user */
00205 #define _SC_RE_DUP_MAX          16 /* user */
00206 #define _SC_2_VERSION           17 /* user */
00207 #define _SC_2_C_BIND            18 /* user */
00208 #define _SC_2_C_DEV             19 /* user */
00209 #define _SC_2_CHAR_TERM         20 /* user */
00210 #define _SC_2_FORT_DEV          21 /* user */
00211 #define _SC_2_FORT_RUN          22 /* user */
00212 #define _SC_2_LOCALEDEF         23 /* user */
00213 #define _SC_2_SW_DEV            24 /* user */
00214 #define _SC_2_UPE               25 /* user */
00215 #define _SC_STREAM_MAX          26 /* user */
00216 #define _SC_TZNAME_MAX          27 /* user */
00217 
00218 #if __POSIX_VISIBLE >= 199309
00219 #define _SC_ASYNCHRONOUS_IO     28
00220 #define _SC_MAPPED_FILES        29
00221 #define _SC_MEMLOCK             30
00222 #define _SC_MEMLOCK_RANGE       31
00223 #define _SC_MEMORY_PROTECTION   32
00224 #define _SC_MESSAGE_PASSING     33
00225 #define _SC_PRIORITIZED_IO      34
00226 #define _SC_PRIORITY_SCHEDULING 35
00227 #define _SC_REALTIME_SIGNALS    36
00228 #define _SC_SEMAPHORES          37
00229 #define _SC_FSYNC               38
00230 #define _SC_SHARED_MEMORY_OBJECTS 39
00231 #define _SC_SYNCHRONIZED_IO     40
00232 #define _SC_TIMERS              41
00233 #define _SC_AIO_LISTIO_MAX      42
00234 #define _SC_AIO_MAX             43
00235 #define _SC_AIO_PRIO_DELTA_MAX  44
00236 #define _SC_DELAYTIMER_MAX      45
00237 #define _SC_MQ_OPEN_MAX         46
00238 #define _SC_PAGESIZE            47
00239 #define _SC_RTSIG_MAX           48
00240 #define _SC_SEM_NSEMS_MAX       49
00241 #define _SC_SEM_VALUE_MAX       50
00242 #define _SC_SIGQUEUE_MAX        51
00243 #define _SC_TIMER_MAX           52
00244 #endif
00245 
00246 #if __POSIX_VISIBLE >= 200112
00247 #define _SC_2_PBS               59 /* user */
00248 #define _SC_2_PBS_ACCOUNTING    60 /* user */
00249 #define _SC_2_PBS_CHECKPOINT    61 /* user */
00250 #define _SC_2_PBS_LOCATE        62 /* user */
00251 #define _SC_2_PBS_MESSAGE       63 /* user */
00252 #define _SC_2_PBS_TRACK         64 /* user */
00253 #define _SC_ADVISORY_INFO       65
00254 #define _SC_BARRIERS            66 /* user */
00255 #define _SC_CLOCK_SELECTION     67
00256 #define _SC_CPUTIME             68
00257 #define _SC_FILE_LOCKING        69
00258 #define _SC_GETGR_R_SIZE_MAX    70 /* user */
00259 #define _SC_GETPW_R_SIZE_MAX    71 /* user */
00260 #define _SC_HOST_NAME_MAX       72
00261 #define _SC_LOGIN_NAME_MAX      73
00262 #define _SC_MONOTONIC_CLOCK     74
00263 #define _SC_MQ_PRIO_MAX         75
00264 #define _SC_READER_WRITER_LOCKS 76 /* user */
00265 #define _SC_REGEXP              77 /* user */
00266 #define _SC_SHELL               78 /* user */
00267 #define _SC_SPAWN               79 /* user */
00268 #define _SC_SPIN_LOCKS          80 /* user */
00269 #define _SC_SPORADIC_SERVER     81
00270 #define _SC_THREAD_ATTR_STACKADDR 82 /* user */
00271 #define _SC_THREAD_ATTR_STACKSIZE 83 /* user */
00272 #define _SC_THREAD_CPUTIME      84 /* user */
00273 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */
00274 #define _SC_THREAD_KEYS_MAX     86 /* user */
00275 #define _SC_THREAD_PRIO_INHERIT 87 /* user */
00276 #define _SC_THREAD_PRIO_PROTECT 88 /* user */
00277 #define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */
00278 #define _SC_THREAD_PROCESS_SHARED 90 /* user */
00279 #define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */
00280 #define _SC_THREAD_SPORADIC_SERVER 92 /* user */
00281 #define _SC_THREAD_STACK_MIN    93 /* user */
00282 #define _SC_THREAD_THREADS_MAX  94 /* user */
00283 #define _SC_TIMEOUTS            95 /* user */
00284 #define _SC_THREADS             96 /* user */
00285 #define _SC_TRACE               97 /* user */
00286 #define _SC_TRACE_EVENT_FILTER  98 /* user */
00287 #define _SC_TRACE_INHERIT       99 /* user */
00288 #define _SC_TRACE_LOG           100 /* user */
00289 #define _SC_TTY_NAME_MAX        101 /* user */
00290 #define _SC_TYPED_MEMORY_OBJECTS 102
00291 #define _SC_V6_ILP32_OFF32      103 /* user */
00292 #define _SC_V6_ILP32_OFFBIG     104 /* user */
00293 #define _SC_V6_LP64_OFF64       105 /* user */
00294 #define _SC_V6_LPBIG_OFFBIG     106 /* user */
00295 #define _SC_IPV6                118
00296 #define _SC_RAW_SOCKETS         119
00297 #define _SC_SYMLOOP_MAX         120
00298 #endif
00299 
00300 #if __XSI_VISIBLE
00301 #define _SC_ATEXIT_MAX          107 /* user */
00302 #define _SC_IOV_MAX             56
00303 #define _SC_PAGE_SIZE           _SC_PAGESIZE
00304 #define _SC_XOPEN_CRYPT         108 /* user */
00305 #define _SC_XOPEN_ENH_I18N      109 /* user */
00306 #define _SC_XOPEN_LEGACY        110 /* user */
00307 #define _SC_XOPEN_REALTIME      111
00308 #define _SC_XOPEN_REALTIME_THREADS 112
00309 #define _SC_XOPEN_SHM           113
00310 #define _SC_XOPEN_STREAMS       114
00311 #define _SC_XOPEN_UNIX          115
00312 #define _SC_XOPEN_VERSION       116
00313 #define _SC_XOPEN_XCU_VERSION   117 /* user */
00314 #endif
00315 
00316 #if __BSD_VISIBLE
00317 #define _SC_NPROCESSORS_CONF    57
00318 #define _SC_NPROCESSORS_ONLN    58
00319 #endif
00320 
00321 /* Keys for the confstr(3) function. */
00322 #if __POSIX_VISIBLE >= 199209
00323 #define _CS_PATH                1       /* default value of PATH */
00324 #endif
00325 
00326 #if __POSIX_VISIBLE >= 200112
00327 #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS         2
00328 #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS        3
00329 #define _CS_POSIX_V6_ILP32_OFF32_LIBS           4
00330 #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS        5
00331 #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS       6
00332 #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS          7
00333 #define _CS_POSIX_V6_LP64_OFF64_CFLAGS          8
00334 #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS         9
00335 #define _CS_POSIX_V6_LP64_OFF64_LIBS            10
00336 #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS        11
00337 #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS       12
00338 #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS          13
00339 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS      14
00340 #endif
00341 
00342 __BEGIN_DECLS
00343 /* 1003.1-1990 */
00344 IMPORT_C void    _exit(int) __dead2;
00345 IMPORT_C int     access(const char *, int);
00346 IMPORT_C int     chdir(const char *);
00347 IMPORT_C int     chown(const char *, uid_t, gid_t);
00348 IMPORT_C int     close(int);
00349 IMPORT_C int     dup(int);
00350 IMPORT_C int     dup2(int, int);
00351 int      eaccess(const char *, int);
00352 IMPORT_C long    fpathconf(int, int);
00353 IMPORT_C char   *getcwd(char *, size_t);
00354 IMPORT_C gid_t   getegid(void);
00355 IMPORT_C uid_t   geteuid(void);
00356 IMPORT_C gid_t   getgid(void);
00357 gid_t _getgid(void);
00358 IMPORT_C int     getgroups(int, gid_t []);
00359 char    *getlogin(void);
00360 IMPORT_C pid_t   getpgrp(void);
00361 IMPORT_C pid_t   getpid(void);
00362 IMPORT_C pid_t   getppid(void);
00363 IMPORT_C uid_t   getuid(void);
00364 uid_t    _getuid(void);
00365 IMPORT_C int     isatty(int);
00366 IMPORT_C int     link(const char *, const char *);
00367 #ifndef _LSEEK_DECLARED
00368 #define _LSEEK_DECLARED
00369 IMPORT_C off_t   lseek(int, off_t, int);
00370 #endif
00371 IMPORT_C long    pathconf(const char *, int);
00372 IMPORT_C int pipe(int *);
00373 IMPORT_C ssize_t         read(int, void *, size_t);
00374 IMPORT_C int     rmdir(const char *);
00375 IMPORT_C int     setgid(gid_t);
00376 IMPORT_C int     setpgid(pid_t, pid_t);
00377 void     setproctitle(const char *_fmt, ...) __printf0like(1, 2);
00378 IMPORT_C pid_t   setsid(void);
00379 IMPORT_C int     setuid(uid_t);
00380 IMPORT_C unsigned int    sleep(unsigned int);
00381 IMPORT_C 
00382 long     sysconf(int);
00383 IMPORT_C int     unlink(const char *);
00384 IMPORT_C ssize_t         write(int, const void *, size_t);
00385 /* 1003.2-1992 */
00386 #if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE
00387 IMPORT_C size_t  confstr(int, char *, size_t);
00388 #ifndef _GETOPT_DECLARED
00389 #define _GETOPT_DECLARED
00390 IMPORT_C int     getopt(int, char * const [], const char *);
00391 
00392 #ifndef __SYMBIAN32__
00393 extern char *optarg;                    /* getopt(3) external variables */
00394 extern int optind, opterr, optopt;
00395 #else
00396 IMPORT_C int *__optopt(void);
00397 IMPORT_C int *__opterr(void);
00398 IMPORT_C int *__optind(void);
00399 IMPORT_C char **__optarg(void);
00400 #define optopt    (*__optopt())
00401 #define opterr    (*__opterr())
00402 #define optind    (*__optind())
00403 #define optarg    (*__optarg())
00404 #endif /* __SYMBIAN32__ */
00405 
00406 #endif /* _GETOPT_DECLARED */
00407 #endif
00408 
00409 /* ISO/IEC 9945-1: 1996 */
00410 #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
00411 IMPORT_C int     fsync(int);
00412 IMPORT_C int fdatasync(int);
00413 /*
00414  * ftruncate() was in the POSIX Realtime Extension (it's used for shared
00415  * memory), but truncate() was not.
00416  */
00417 #ifndef _FTRUNCATE_DECLARED
00418 #define _FTRUNCATE_DECLARED
00419 IMPORT_C int     ftruncate(int, off_t);
00420 #endif
00421 #endif
00422 
00423 #if __POSIX_VISIBLE >= 199506
00424 
00425 #ifdef __SYMBIAN_COMPILE_UNUSED__
00426 int      getlogin_r(char *, int);
00427 #endif
00428 
00429 #endif
00430 
00431 /* 1003.1-2001 */
00432 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
00433 IMPORT_C int     readlink(const char *, char *, int);
00434 #endif
00435 #if __POSIX_VISIBLE >= 200112
00436 IMPORT_C int     gethostname(char *, size_t);
00437 IMPORT_C int     setegid(gid_t);
00438 IMPORT_C int     seteuid(uid_t);
00439 #endif
00440 
00441 /*
00442  * symlink() was originally in POSIX.1a, which was withdrawn after
00443  * being overtaken by events (1003.1-2001).  It was in XPG4.2, and of
00444  * course has been in BSD since 4.2.
00445  */
00446 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE
00447 IMPORT_C int     symlink(const char * __restrict, const char * __restrict);
00448 #endif
00449 
00450 /* X/Open System Interfaces */
00451 #if __XSI_VISIBLE
00452 char    *crypt(const char *, const char *);
00453 /* char *ctermid(char *); */            /* XXX ??? */
00454 int      encrypt(char *, int);
00455 IMPORT_C int     fchdir(int);
00456 IMPORT_C int     getpgid(pid_t _pid);
00457 IMPORT_C int     lchown(const char *, uid_t, gid_t);
00458 IMPORT_C int     nice(int);
00459 IMPORT_C int     setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */
00460 IMPORT_C int     setregid(gid_t, gid_t);
00461 IMPORT_C int     setreuid(uid_t, uid_t);
00462 
00463 #ifndef _SWAB_DECLARED
00464 #define _SWAB_DECLARED
00465 IMPORT_C 
00466 void     swab(const void * __restrict, void * __restrict, ssize_t);
00467 #endif /* _SWAB_DECLARED */
00468 
00469 void     sync(void);
00470 IMPORT_C int     usleep(useconds_t);
00471 
00472 /* See comment at ftruncate() above. */
00473 #ifndef _TRUNCATE_DECLARED
00474 #define _TRUNCATE_DECLARED
00475 IMPORT_C int     truncate(const char *, off_t);
00476 #endif
00477 #endif /* __XSI_VISIBLE */
00478 
00479 #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
00480 IMPORT_C int     brk(const void *);
00481 IMPORT_C int     getdtablesize(void);
00482 IMPORT_C int     getpagesize(void) __pure2;
00483 #endif
00484 
00485 #if __BSD_VISIBLE
00486 struct timeval;                         /* select(2) */
00487 IMPORT_C int     initgroups(const char *, gid_t);
00488 IMPORT_C int     issetugid(void);
00489 
00490 #ifdef __SYMBIAN_COMPILE_UNUSED__
00491 char    *mkdtemp(char *);
00492 #endif
00493 
00494 #ifndef _MKNOD_DECLARED
00495 int      mknod(const char *, mode_t, dev_t);
00496 #define _MKNOD_DECLARED
00497 #endif
00498 #ifndef _MKSTEMP_DECLARED
00499 IMPORT_C int     mkstemp(char *);
00500 #define _MKSTEMP_DECLARED
00501 #endif
00502 
00503 #ifdef __SYMBIAN_COMPILE_UNUSED__
00504 int      mkstemps(char *, int);
00505 #endif
00506 
00507 #ifndef _MKTEMP_DECLARED
00508 
00509 #ifdef __SYMBIAN_COMPILE_UNUSED__
00510 char    *mktemp(char *);
00511 #endif
00512 
00513 #define _MKTEMP_DECLARED
00514 #endif
00515 int      nfssvc(int, void *);
00516 
00517 #if __BSD_VISIBLE
00518 #ifndef __SYMBIAN32__
00519 #ifndef _SELECT_DECLARED
00520 #define _SELECT_DECLARED
00521 IMPORT_C int     select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
00522 // _SELECT_DECLARED
00523 #endif
00524 // __SYMBIAN32__
00525 #endif
00526 // __BSD_VISIBLE
00527 #endif
00528 
00529 IMPORT_C int     setgroups(int, const gid_t *);
00530 #ifndef _SETKEY_DECLARED
00531 int      setkey(const char *);
00532 #define _SETKEY_DECLARED
00533 #endif
00534 
00535 #ifndef _OPTRESET_DECLARED
00536 #define _OPTRESET_DECLARED
00537 #ifndef __SYMBIAN32__
00538 extern int optreset;                    /* getopt(3) external variable */
00539 #else
00540 IMPORT_C int *__optreset(void);
00541 #define optreset  (*__optreset())
00542 #endif /* __SYMBIAN32__ */
00543 
00544 #ifdef __SYMBIAN32__
00545 #ifndef __XSI_VISIBLE
00546 void encrypt(char block[], int edflag);
00547 char *crypt(const char *key, const char *salt);
00548 #endif /* ifdef __SYMBIAN32__ */
00549 #endif /* ifndef __XSI_VISIBLE */
00550 
00551 #endif /* _OPTRESET_DECLARED */
00552 #endif /* __BSD_VISIBLE */
00553 __END_DECLS
00554 
00555 //---
00556 #ifdef __cplusplus
00557 }
00558 #endif
00559 //---
00560 
00561 #endif /* !_UNISTD_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top