sl@0: /*- sl@0: * Copyright (c) 1991, 1993, 1994 sl@0: * The Regents of the University of California. All rights reserved. sl@0: * sl@0: * Redistribution and use in source and binary forms, with or without sl@0: * modification, are permitted provided that the following conditions sl@0: * are met: sl@0: * 1. Redistributions of source code must retain the above copyright sl@0: * notice, this list of conditions and the following disclaimer. sl@0: * 2. Redistributions in binary form must reproduce the above copyright sl@0: * notice, this list of conditions and the following disclaimer in the sl@0: * documentation and/or other materials provided with the distribution. sl@0: * 4. Neither the name of the University nor the names of its contributors sl@0: * may be used to endorse or promote products derived from this software sl@0: * without specific prior written permission. sl@0: * sl@0: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND sl@0: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE sl@0: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE sl@0: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE sl@0: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL sl@0: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS sl@0: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) sl@0: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT sl@0: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY sl@0: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF sl@0: * SUCH DAMAGE. sl@0: * sl@0: * Portions Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: * @(#)unistd.h 8.12 (Berkeley) 4/27/95 sl@0: * $FreeBSD: src/include/unistd.h,v 1.78 2005/05/13 16:27:30 delphij Exp $ sl@0: */ sl@0: sl@0: #ifndef _UNISTD_H_ sl@0: #define _UNISTD_H_ sl@0: sl@0: //--- sl@0: #ifdef __cplusplus sl@0: #include sl@0: sl@0: extern "C" { sl@0: #endif sl@0: sl@0: //--- sl@0: sl@0: #include sl@0: #include /* XXX adds too much pollution. */ sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: #include <_ansi.h> sl@0: #endif //__SYMBIAN32__ sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: __BEGIN_DECLS sl@0: IMPORT_C char ***__environ(void); sl@0: __END_DECLS sl@0: #define environ (*__environ()) sl@0: #endif //__SYMBIAN32__ sl@0: sl@0: #ifndef _GID_T_DECLARED sl@0: typedef __gid_t gid_t; sl@0: #define _GID_T_DECLARED sl@0: #endif sl@0: sl@0: #ifndef _OFF_T_DECLARED sl@0: typedef __off_t off_t; sl@0: #define _OFF_T_DECLARED sl@0: #endif sl@0: sl@0: #ifndef _PID_T_DECLARED sl@0: typedef __pid_t pid_t; sl@0: #define _PID_T_DECLARED sl@0: #endif sl@0: sl@0: #ifndef _SIZE_T_DECLARED sl@0: typedef __size_t size_t; sl@0: #define _SIZE_T_DECLARED sl@0: #endif sl@0: sl@0: #ifndef _SSIZE_T_DECLARED sl@0: typedef __ssize_t ssize_t; sl@0: #define _SSIZE_T_DECLARED sl@0: #endif sl@0: sl@0: #ifndef _UID_T_DECLARED sl@0: typedef __uid_t uid_t; sl@0: #define _UID_T_DECLARED sl@0: #endif sl@0: sl@0: #ifndef _USECONDS_T_DECLARED sl@0: typedef __useconds_t useconds_t; sl@0: #define _USECONDS_T_DECLARED sl@0: #endif sl@0: sl@0: #define STDIN_FILENO 0 /* standard input file descriptor */ sl@0: #define STDOUT_FILENO 1 /* standard output file descriptor */ sl@0: #define STDERR_FILENO 2 /* standard error file descriptor */ sl@0: sl@0: #if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 sl@0: #define F_ULOCK 0 /* unlock locked section */ sl@0: #define F_LOCK 1 /* lock a section for exclusive use */ sl@0: #define F_TLOCK 2 /* test and lock a section for exclusive use */ sl@0: #define F_TEST 3 /* test a section for locks by other procs */ sl@0: #endif sl@0: sl@0: /* sl@0: * POSIX options and option groups we unconditionally do or don't sl@0: * implement. This list includes those options which are exclusively sl@0: * implemented (or not) in user mode. Please keep this list in sl@0: * alphabetical order. sl@0: * sl@0: * Anything which is defined as zero below **must** have an sl@0: * implementation for the corresponding sysconf() which is able to sl@0: * determine conclusively whether or not the feature is supported. sl@0: * Anything which is defined as other than -1 below **must** have sl@0: * complete headers, types, and function declarations as specified by sl@0: * the POSIX standard; however, if the relevant sysconf() function sl@0: * returns -1, the functions may be stubbed out. sl@0: */ sl@0: #define _POSIX_BARRIERS -1 sl@0: #define _POSIX_READER_WRITER_LOCKS -1 sl@0: #define _POSIX_REGEXP 1 sl@0: #define _POSIX_SHELL 1 sl@0: #define _POSIX_SPAWN -1 sl@0: #define _POSIX_SPIN_LOCKS -1 sl@0: #define _POSIX_THREAD_ATTR_STACKADDR -1 sl@0: #define _POSIX_THREAD_ATTR_STACKSIZE 200112L sl@0: #define _POSIX_THREAD_CPUTIME -1 sl@0: #define _POSIX_THREAD_PRIO_INHERIT -1 sl@0: #define _POSIX_THREAD_PRIO_PROTECT -1 sl@0: #define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L sl@0: #define _POSIX_THREAD_PROCESS_SHARED -1 sl@0: #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L sl@0: #define _POSIX_THREAD_SPORADIC_SERVER -1 sl@0: #define _POSIX_THREADS 200112L sl@0: #define _POSIX_TRACE -1 sl@0: #define _POSIX_TRACE_EVENT_FILTER -1 sl@0: #define _POSIX_TRACE_INHERIT -1 sl@0: #define _POSIX_TRACE_LOG -1 sl@0: #define _POSIX2_C_BIND 200112L /* mandatory */ sl@0: #define _POSIX2_C_DEV -1 /* need c99 utility */ sl@0: #define _POSIX2_CHAR_TERM 1 sl@0: #define _POSIX2_FORT_DEV -1 /* need fort77 utility */ sl@0: #define _POSIX2_FORT_RUN 200112L sl@0: #define _POSIX2_LOCALEDEF -1 sl@0: #define _POSIX2_PBS -1 sl@0: #define _POSIX2_PBS_ACCOUNTING -1 sl@0: #define _POSIX2_PBS_CHECKPOINT -1 sl@0: #define _POSIX2_PBS_LOCATE -1 sl@0: #define _POSIX2_PBS_MESSAGE -1 sl@0: #define _POSIX2_PBS_TRACK -1 sl@0: #define _POSIX2_SW_DEV -1 /* XXX ??? */ sl@0: #define _POSIX2_UPE 200112L sl@0: #define _V6_ILP32_OFF32 -1 sl@0: #define _V6_ILP32_OFFBIG 0 sl@0: #define _V6_LP64_OFF64 0 sl@0: #define _V6_LPBIG_OFFBIG -1 sl@0: sl@0: #if __XSI_VISIBLE sl@0: #define _XOPEN_CRYPT -1 /* XXX ??? */ sl@0: #define _XOPEN_ENH_I18N -1 /* mandatory in XSI */ sl@0: #define _XOPEN_LEGACY -1 sl@0: #define _XOPEN_REALTIME -1 sl@0: #define _XOPEN_REALTIME_THREADS -1 sl@0: #define _XOPEN_UNIX -1 sl@0: #endif sl@0: sl@0: /* Define the POSIX.2 version we target for compliance. */ sl@0: #define _POSIX2_VERSION 199212L sl@0: sl@0: /* sl@0: * POSIX-style system configuration variable accessors (for the sl@0: * sysconf function). The kernel does not directly implement the sl@0: * sysconf() interface; rather, a C library stub translates references sl@0: * to sysconf() into calls to sysctl() using a giant switch statement. sl@0: * Those that are marked `user' are implemented entirely in the C sl@0: * library and never query the kernel. pathconf() is implemented sl@0: * directly by the kernel so those are not defined here. sl@0: */ sl@0: #define _SC_ARG_MAX 1 sl@0: #define _SC_CHILD_MAX 2 sl@0: #define _SC_CLK_TCK 3 sl@0: #define _SC_NGROUPS_MAX 4 sl@0: #define _SC_OPEN_MAX 5 sl@0: #define _SC_JOB_CONTROL 6 sl@0: #define _SC_SAVED_IDS 7 sl@0: #define _SC_VERSION 8 sl@0: #define _SC_BC_BASE_MAX 9 /* user */ sl@0: #define _SC_BC_DIM_MAX 10 /* user */ sl@0: #define _SC_BC_SCALE_MAX 11 /* user */ sl@0: #define _SC_BC_STRING_MAX 12 /* user */ sl@0: #define _SC_COLL_WEIGHTS_MAX 13 /* user */ sl@0: #define _SC_EXPR_NEST_MAX 14 /* user */ sl@0: #define _SC_LINE_MAX 15 /* user */ sl@0: #define _SC_RE_DUP_MAX 16 /* user */ sl@0: #define _SC_2_VERSION 17 /* user */ sl@0: #define _SC_2_C_BIND 18 /* user */ sl@0: #define _SC_2_C_DEV 19 /* user */ sl@0: #define _SC_2_CHAR_TERM 20 /* user */ sl@0: #define _SC_2_FORT_DEV 21 /* user */ sl@0: #define _SC_2_FORT_RUN 22 /* user */ sl@0: #define _SC_2_LOCALEDEF 23 /* user */ sl@0: #define _SC_2_SW_DEV 24 /* user */ sl@0: #define _SC_2_UPE 25 /* user */ sl@0: #define _SC_STREAM_MAX 26 /* user */ sl@0: #define _SC_TZNAME_MAX 27 /* user */ sl@0: sl@0: #if __POSIX_VISIBLE >= 199309 sl@0: #define _SC_ASYNCHRONOUS_IO 28 sl@0: #define _SC_MAPPED_FILES 29 sl@0: #define _SC_MEMLOCK 30 sl@0: #define _SC_MEMLOCK_RANGE 31 sl@0: #define _SC_MEMORY_PROTECTION 32 sl@0: #define _SC_MESSAGE_PASSING 33 sl@0: #define _SC_PRIORITIZED_IO 34 sl@0: #define _SC_PRIORITY_SCHEDULING 35 sl@0: #define _SC_REALTIME_SIGNALS 36 sl@0: #define _SC_SEMAPHORES 37 sl@0: #define _SC_FSYNC 38 sl@0: #define _SC_SHARED_MEMORY_OBJECTS 39 sl@0: #define _SC_SYNCHRONIZED_IO 40 sl@0: #define _SC_TIMERS 41 sl@0: #define _SC_AIO_LISTIO_MAX 42 sl@0: #define _SC_AIO_MAX 43 sl@0: #define _SC_AIO_PRIO_DELTA_MAX 44 sl@0: #define _SC_DELAYTIMER_MAX 45 sl@0: #define _SC_MQ_OPEN_MAX 46 sl@0: #define _SC_PAGESIZE 47 sl@0: #define _SC_RTSIG_MAX 48 sl@0: #define _SC_SEM_NSEMS_MAX 49 sl@0: #define _SC_SEM_VALUE_MAX 50 sl@0: #define _SC_SIGQUEUE_MAX 51 sl@0: #define _SC_TIMER_MAX 52 sl@0: #endif sl@0: sl@0: #if __POSIX_VISIBLE >= 200112 sl@0: #define _SC_2_PBS 59 /* user */ sl@0: #define _SC_2_PBS_ACCOUNTING 60 /* user */ sl@0: #define _SC_2_PBS_CHECKPOINT 61 /* user */ sl@0: #define _SC_2_PBS_LOCATE 62 /* user */ sl@0: #define _SC_2_PBS_MESSAGE 63 /* user */ sl@0: #define _SC_2_PBS_TRACK 64 /* user */ sl@0: #define _SC_ADVISORY_INFO 65 sl@0: #define _SC_BARRIERS 66 /* user */ sl@0: #define _SC_CLOCK_SELECTION 67 sl@0: #define _SC_CPUTIME 68 sl@0: #define _SC_FILE_LOCKING 69 sl@0: #define _SC_GETGR_R_SIZE_MAX 70 /* user */ sl@0: #define _SC_GETPW_R_SIZE_MAX 71 /* user */ sl@0: #define _SC_HOST_NAME_MAX 72 sl@0: #define _SC_LOGIN_NAME_MAX 73 sl@0: #define _SC_MONOTONIC_CLOCK 74 sl@0: #define _SC_MQ_PRIO_MAX 75 sl@0: #define _SC_READER_WRITER_LOCKS 76 /* user */ sl@0: #define _SC_REGEXP 77 /* user */ sl@0: #define _SC_SHELL 78 /* user */ sl@0: #define _SC_SPAWN 79 /* user */ sl@0: #define _SC_SPIN_LOCKS 80 /* user */ sl@0: #define _SC_SPORADIC_SERVER 81 sl@0: #define _SC_THREAD_ATTR_STACKADDR 82 /* user */ sl@0: #define _SC_THREAD_ATTR_STACKSIZE 83 /* user */ sl@0: #define _SC_THREAD_CPUTIME 84 /* user */ sl@0: #define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */ sl@0: #define _SC_THREAD_KEYS_MAX 86 /* user */ sl@0: #define _SC_THREAD_PRIO_INHERIT 87 /* user */ sl@0: #define _SC_THREAD_PRIO_PROTECT 88 /* user */ sl@0: #define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */ sl@0: #define _SC_THREAD_PROCESS_SHARED 90 /* user */ sl@0: #define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */ sl@0: #define _SC_THREAD_SPORADIC_SERVER 92 /* user */ sl@0: #define _SC_THREAD_STACK_MIN 93 /* user */ sl@0: #define _SC_THREAD_THREADS_MAX 94 /* user */ sl@0: #define _SC_TIMEOUTS 95 /* user */ sl@0: #define _SC_THREADS 96 /* user */ sl@0: #define _SC_TRACE 97 /* user */ sl@0: #define _SC_TRACE_EVENT_FILTER 98 /* user */ sl@0: #define _SC_TRACE_INHERIT 99 /* user */ sl@0: #define _SC_TRACE_LOG 100 /* user */ sl@0: #define _SC_TTY_NAME_MAX 101 /* user */ sl@0: #define _SC_TYPED_MEMORY_OBJECTS 102 sl@0: #define _SC_V6_ILP32_OFF32 103 /* user */ sl@0: #define _SC_V6_ILP32_OFFBIG 104 /* user */ sl@0: #define _SC_V6_LP64_OFF64 105 /* user */ sl@0: #define _SC_V6_LPBIG_OFFBIG 106 /* user */ sl@0: #define _SC_IPV6 118 sl@0: #define _SC_RAW_SOCKETS 119 sl@0: #define _SC_SYMLOOP_MAX 120 sl@0: #endif sl@0: sl@0: #if __XSI_VISIBLE sl@0: #define _SC_ATEXIT_MAX 107 /* user */ sl@0: #define _SC_IOV_MAX 56 sl@0: #define _SC_PAGE_SIZE _SC_PAGESIZE sl@0: #define _SC_XOPEN_CRYPT 108 /* user */ sl@0: #define _SC_XOPEN_ENH_I18N 109 /* user */ sl@0: #define _SC_XOPEN_LEGACY 110 /* user */ sl@0: #define _SC_XOPEN_REALTIME 111 sl@0: #define _SC_XOPEN_REALTIME_THREADS 112 sl@0: #define _SC_XOPEN_SHM 113 sl@0: #define _SC_XOPEN_STREAMS 114 sl@0: #define _SC_XOPEN_UNIX 115 sl@0: #define _SC_XOPEN_VERSION 116 sl@0: #define _SC_XOPEN_XCU_VERSION 117 /* user */ sl@0: #endif sl@0: sl@0: #if __BSD_VISIBLE sl@0: #define _SC_NPROCESSORS_CONF 57 sl@0: #define _SC_NPROCESSORS_ONLN 58 sl@0: #endif sl@0: sl@0: /* Keys for the confstr(3) function. */ sl@0: #if __POSIX_VISIBLE >= 199209 sl@0: #define _CS_PATH 1 /* default value of PATH */ sl@0: #endif sl@0: sl@0: #if __POSIX_VISIBLE >= 200112 sl@0: #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 sl@0: #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 sl@0: #define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 sl@0: #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 sl@0: #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 sl@0: #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 sl@0: #define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 sl@0: #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 sl@0: #define _CS_POSIX_V6_LP64_OFF64_LIBS 10 sl@0: #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 sl@0: #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 sl@0: #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 sl@0: #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 sl@0: #endif sl@0: sl@0: __BEGIN_DECLS sl@0: /* 1003.1-1990 */ sl@0: IMPORT_C void _exit(int) __dead2; sl@0: IMPORT_C int access(const char *, int); sl@0: IMPORT_C int chdir(const char *); sl@0: IMPORT_C int chown(const char *, uid_t, gid_t); sl@0: IMPORT_C int close(int); sl@0: IMPORT_C int dup(int); sl@0: IMPORT_C int dup2(int, int); sl@0: int eaccess(const char *, int); sl@0: IMPORT_C long fpathconf(int, int); sl@0: IMPORT_C char *getcwd(char *, size_t); sl@0: IMPORT_C gid_t getegid(void); sl@0: IMPORT_C uid_t geteuid(void); sl@0: IMPORT_C gid_t getgid(void); sl@0: IMPORT_C int getgroups(int, gid_t []); sl@0: char *getlogin(void); sl@0: IMPORT_C pid_t getpgrp(void); sl@0: IMPORT_C pid_t getpid(void); sl@0: IMPORT_C pid_t getppid(void); sl@0: IMPORT_C uid_t getuid(void); sl@0: IMPORT_C int isatty(int); sl@0: IMPORT_C int link(const char *, const char *); sl@0: #ifndef _LSEEK_DECLARED sl@0: #define _LSEEK_DECLARED sl@0: IMPORT_C off_t lseek(int, off_t, int); sl@0: sl@0: #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) sl@0: #define lseek64 lseek sl@0: #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ sl@0: sl@0: #endif sl@0: IMPORT_C long pathconf(const char *, int); sl@0: IMPORT_C int pipe(int *); sl@0: IMPORT_C ssize_t read(int, void *, size_t); sl@0: IMPORT_C int rmdir(const char *); sl@0: IMPORT_C int setgid(gid_t); sl@0: IMPORT_C int setpgid(pid_t, pid_t); sl@0: void setproctitle(const char *_fmt, ...) __printf0like(1, 2); sl@0: IMPORT_C pid_t setsid(void); sl@0: IMPORT_C int setuid(uid_t); sl@0: IMPORT_C unsigned int sleep(unsigned int); sl@0: IMPORT_C sl@0: long sysconf(int); sl@0: IMPORT_C int unlink(const char *); sl@0: IMPORT_C ssize_t write(int, const void *, size_t); sl@0: /* 1003.2-1992 */ sl@0: #if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE sl@0: IMPORT_C size_t confstr(int, char *, size_t); sl@0: #ifndef _GETOPT_DECLARED sl@0: #define _GETOPT_DECLARED sl@0: IMPORT_C int getopt(int, char * const [], const char *); sl@0: sl@0: #ifndef __SYMBIAN32__ sl@0: extern char *optarg; /* getopt(3) external variables */ sl@0: extern int optind, opterr, optopt; sl@0: #else sl@0: IMPORT_C int *__optopt(void); sl@0: IMPORT_C int *__opterr(void); sl@0: IMPORT_C int *__optind(void); sl@0: IMPORT_C char **__optarg(void); sl@0: #define optopt (*__optopt()) sl@0: #define opterr (*__opterr()) sl@0: #define optind (*__optind()) sl@0: #define optarg (*__optarg()) sl@0: #endif /* __SYMBIAN32__ */ sl@0: sl@0: #endif /* _GETOPT_DECLARED */ sl@0: #endif sl@0: sl@0: /* ISO/IEC 9945-1: 1996 */ sl@0: #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE sl@0: IMPORT_C int fsync(int); sl@0: IMPORT_C int fdatasync(int); sl@0: /* sl@0: * ftruncate() was in the POSIX Realtime Extension (it's used for shared sl@0: * memory), but truncate() was not. sl@0: */ sl@0: #ifndef _FTRUNCATE_DECLARED sl@0: #define _FTRUNCATE_DECLARED sl@0: IMPORT_C int ftruncate(int, off_t); sl@0: sl@0: #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) sl@0: #define ftruncate64 ftruncate sl@0: #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ sl@0: sl@0: #endif sl@0: #endif sl@0: sl@0: #if __POSIX_VISIBLE >= 199506 sl@0: sl@0: #ifndef __SYMBIAN32__ sl@0: int getlogin_r(char *, int); sl@0: #endif //__SYMBIAN32__ sl@0: sl@0: #endif sl@0: sl@0: /* 1003.1-2001 */ sl@0: #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE sl@0: IMPORT_C int readlink(const char *, char *, int); sl@0: #endif sl@0: #if __POSIX_VISIBLE >= 200112 sl@0: IMPORT_C int gethostname(char *, size_t); sl@0: IMPORT_C int setegid(gid_t); sl@0: IMPORT_C int seteuid(uid_t); sl@0: #endif sl@0: sl@0: /* sl@0: * symlink() was originally in POSIX.1a, which was withdrawn after sl@0: * being overtaken by events (1003.1-2001). It was in XPG4.2, and of sl@0: * course has been in BSD since 4.2. sl@0: */ sl@0: #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE sl@0: IMPORT_C int symlink(const char * __restrict, const char * __restrict); sl@0: #endif sl@0: sl@0: /* X/Open System Interfaces */ sl@0: #if __XSI_VISIBLE sl@0: char *crypt(const char *, const char *); sl@0: /* char *ctermid(char *); */ /* XXX ??? */ sl@0: int encrypt(char *, int); sl@0: IMPORT_C int fchdir(int); sl@0: IMPORT_C int getpgid(pid_t _pid); sl@0: IMPORT_C int lchown(const char *, uid_t, gid_t); sl@0: IMPORT_C int nice(int); sl@0: IMPORT_C int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */ sl@0: IMPORT_C int setregid(gid_t, gid_t); sl@0: IMPORT_C int setreuid(uid_t, uid_t); sl@0: sl@0: #ifndef _SWAB_DECLARED sl@0: #define _SWAB_DECLARED sl@0: IMPORT_C sl@0: void swab(const void * __restrict, void * __restrict, ssize_t); sl@0: #endif /* _SWAB_DECLARED */ sl@0: sl@0: void sync(void); sl@0: IMPORT_C int usleep(useconds_t); sl@0: sl@0: IMPORT_C unsigned int alarm(unsigned int seconds); sl@0: sl@0: /* See comment at ftruncate() above. */ sl@0: #ifndef _TRUNCATE_DECLARED sl@0: #define _TRUNCATE_DECLARED sl@0: IMPORT_C int truncate(const char *, off_t); sl@0: sl@0: #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) sl@0: #define truncate64 truncate sl@0: #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ sl@0: sl@0: #endif sl@0: #endif /* __XSI_VISIBLE */ sl@0: sl@0: #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE sl@0: IMPORT_C int brk(const void *); sl@0: IMPORT_C int getdtablesize(void); sl@0: IMPORT_C int getpagesize(void) __pure2; sl@0: #endif sl@0: sl@0: #if __BSD_VISIBLE sl@0: struct timeval; /* select(2) */ sl@0: IMPORT_C int initgroups(const char *, gid_t); sl@0: IMPORT_C int issetugid(void); sl@0: sl@0: #ifdef __SYMBIAN_COMPILE_UNUSED__ sl@0: char *mkdtemp(char *); sl@0: #endif sl@0: sl@0: #ifndef _MKNOD_DECLARED sl@0: int mknod(const char *, mode_t, dev_t); sl@0: #define _MKNOD_DECLARED sl@0: #endif sl@0: #ifndef _MKSTEMP_DECLARED sl@0: IMPORT_C int mkstemp(char *); sl@0: sl@0: #if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS) sl@0: #define mkstemp64 mkstemp sl@0: #endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */ sl@0: sl@0: #define _MKSTEMP_DECLARED sl@0: #endif sl@0: sl@0: #ifdef __SYMBIAN_COMPILE_UNUSED__ sl@0: int mkstemps(char *, int); sl@0: #endif sl@0: sl@0: #ifndef _MKTEMP_DECLARED sl@0: sl@0: #ifdef __SYMBIAN_COMPILE_UNUSED__ sl@0: char *mktemp(char *); sl@0: #endif sl@0: sl@0: #define _MKTEMP_DECLARED sl@0: #endif sl@0: int nfssvc(int, void *); sl@0: sl@0: #if __BSD_VISIBLE sl@0: #ifndef __SYMBIAN32__ sl@0: #ifndef _SELECT_DECLARED sl@0: #define _SELECT_DECLARED sl@0: IMPORT_C int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); sl@0: #endif // _SELECT_DECLARED sl@0: #endif // __SYMBIAN32__ sl@0: #endif // __BSD_VISIBLE sl@0: sl@0: IMPORT_C int setgroups(int, const gid_t *); sl@0: #ifndef _SETKEY_DECLARED sl@0: int setkey(const char *); sl@0: #define _SETKEY_DECLARED sl@0: #endif sl@0: sl@0: #ifndef _OPTRESET_DECLARED sl@0: #define _OPTRESET_DECLARED sl@0: #ifndef __SYMBIAN32__ sl@0: extern int optreset; /* getopt(3) external variable */ sl@0: #else sl@0: IMPORT_C int *__optreset(void); sl@0: #define optreset (*__optreset()) sl@0: #endif /* __SYMBIAN32__ */ sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: #ifndef __XSI_VISIBLE sl@0: void encrypt(char block[], int edflag); sl@0: char *crypt(const char *key, const char *salt); sl@0: #endif /* ifdef __SYMBIAN32__ */ sl@0: #endif /* ifndef __XSI_VISIBLE */ sl@0: sl@0: #endif /* _OPTRESET_DECLARED */ sl@0: #endif /* __BSD_VISIBLE */ sl@0: __END_DECLS sl@0: sl@0: //--- sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: //--- sl@0: sl@0: #endif /* !_UNISTD_H_ */