1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/unistd.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,571 @@
1.4 +/*-
1.5 + * Copyright (c) 1991, 1993, 1994
1.6 + * The Regents of the University of California. All rights reserved.
1.7 + *
1.8 + * Redistribution and use in source and binary forms, with or without
1.9 + * modification, are permitted provided that the following conditions
1.10 + * are met:
1.11 + * 1. Redistributions of source code must retain the above copyright
1.12 + * notice, this list of conditions and the following disclaimer.
1.13 + * 2. Redistributions in binary form must reproduce the above copyright
1.14 + * notice, this list of conditions and the following disclaimer in the
1.15 + * documentation and/or other materials provided with the distribution.
1.16 + * 4. Neither the name of the University nor the names of its contributors
1.17 + * may be used to endorse or promote products derived from this software
1.18 + * without specific prior written permission.
1.19 + *
1.20 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1.21 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.22 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1.23 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1.24 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.25 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1.26 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1.27 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1.28 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1.29 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1.30 + * SUCH DAMAGE.
1.31 + *
1.32 + * Portions Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.33 + * @(#)unistd.h 8.12 (Berkeley) 4/27/95
1.34 + * $FreeBSD: src/include/unistd.h,v 1.78 2005/05/13 16:27:30 delphij Exp $
1.35 + */
1.36 +
1.37 +#ifndef _UNISTD_H_
1.38 +#define _UNISTD_H_
1.39 +
1.40 +//---
1.41 +#ifdef __cplusplus
1.42 +#include <e32def.h>
1.43 +
1.44 +extern "C" {
1.45 +#endif
1.46 +
1.47 +//---
1.48 +
1.49 +#include <sys/cdefs.h>
1.50 +#include <sys/types.h> /* XXX adds too much pollution. */
1.51 +#include <sys/unistd.h>
1.52 +#include <sys/_null.h>
1.53 +#include <sys/_types.h>
1.54 +
1.55 +#ifdef __SYMBIAN32__
1.56 +#include <_ansi.h>
1.57 +#endif //__SYMBIAN32__
1.58 +
1.59 +#ifdef __SYMBIAN32__
1.60 +__BEGIN_DECLS
1.61 +IMPORT_C char ***__environ(void);
1.62 +__END_DECLS
1.63 +#define environ (*__environ())
1.64 +#endif //__SYMBIAN32__
1.65 +
1.66 +#ifndef _GID_T_DECLARED
1.67 +typedef __gid_t gid_t;
1.68 +#define _GID_T_DECLARED
1.69 +#endif
1.70 +
1.71 +#ifndef _OFF_T_DECLARED
1.72 +typedef __off_t off_t;
1.73 +#define _OFF_T_DECLARED
1.74 +#endif
1.75 +
1.76 +#ifndef _PID_T_DECLARED
1.77 +typedef __pid_t pid_t;
1.78 +#define _PID_T_DECLARED
1.79 +#endif
1.80 +
1.81 +#ifndef _SIZE_T_DECLARED
1.82 +typedef __size_t size_t;
1.83 +#define _SIZE_T_DECLARED
1.84 +#endif
1.85 +
1.86 +#ifndef _SSIZE_T_DECLARED
1.87 +typedef __ssize_t ssize_t;
1.88 +#define _SSIZE_T_DECLARED
1.89 +#endif
1.90 +
1.91 +#ifndef _UID_T_DECLARED
1.92 +typedef __uid_t uid_t;
1.93 +#define _UID_T_DECLARED
1.94 +#endif
1.95 +
1.96 +#ifndef _USECONDS_T_DECLARED
1.97 +typedef __useconds_t useconds_t;
1.98 +#define _USECONDS_T_DECLARED
1.99 +#endif
1.100 +
1.101 +#define STDIN_FILENO 0 /* standard input file descriptor */
1.102 +#define STDOUT_FILENO 1 /* standard output file descriptor */
1.103 +#define STDERR_FILENO 2 /* standard error file descriptor */
1.104 +
1.105 +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
1.106 +#define F_ULOCK 0 /* unlock locked section */
1.107 +#define F_LOCK 1 /* lock a section for exclusive use */
1.108 +#define F_TLOCK 2 /* test and lock a section for exclusive use */
1.109 +#define F_TEST 3 /* test a section for locks by other procs */
1.110 +#endif
1.111 +
1.112 +/*
1.113 + * POSIX options and option groups we unconditionally do or don't
1.114 + * implement. This list includes those options which are exclusively
1.115 + * implemented (or not) in user mode. Please keep this list in
1.116 + * alphabetical order.
1.117 + *
1.118 + * Anything which is defined as zero below **must** have an
1.119 + * implementation for the corresponding sysconf() which is able to
1.120 + * determine conclusively whether or not the feature is supported.
1.121 + * Anything which is defined as other than -1 below **must** have
1.122 + * complete headers, types, and function declarations as specified by
1.123 + * the POSIX standard; however, if the relevant sysconf() function
1.124 + * returns -1, the functions may be stubbed out.
1.125 + */
1.126 +#define _POSIX_BARRIERS -1
1.127 +#define _POSIX_READER_WRITER_LOCKS -1
1.128 +#define _POSIX_REGEXP 1
1.129 +#define _POSIX_SHELL 1
1.130 +#define _POSIX_SPAWN -1
1.131 +#define _POSIX_SPIN_LOCKS -1
1.132 +#define _POSIX_THREAD_ATTR_STACKADDR -1
1.133 +#define _POSIX_THREAD_ATTR_STACKSIZE 200112L
1.134 +#define _POSIX_THREAD_CPUTIME -1
1.135 +#define _POSIX_THREAD_PRIO_INHERIT -1
1.136 +#define _POSIX_THREAD_PRIO_PROTECT -1
1.137 +#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L
1.138 +#define _POSIX_THREAD_PROCESS_SHARED -1
1.139 +#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
1.140 +#define _POSIX_THREAD_SPORADIC_SERVER -1
1.141 +#define _POSIX_THREADS 200112L
1.142 +#define _POSIX_TRACE -1
1.143 +#define _POSIX_TRACE_EVENT_FILTER -1
1.144 +#define _POSIX_TRACE_INHERIT -1
1.145 +#define _POSIX_TRACE_LOG -1
1.146 +#define _POSIX2_C_BIND 200112L /* mandatory */
1.147 +#define _POSIX2_C_DEV -1 /* need c99 utility */
1.148 +#define _POSIX2_CHAR_TERM 1
1.149 +#define _POSIX2_FORT_DEV -1 /* need fort77 utility */
1.150 +#define _POSIX2_FORT_RUN 200112L
1.151 +#define _POSIX2_LOCALEDEF -1
1.152 +#define _POSIX2_PBS -1
1.153 +#define _POSIX2_PBS_ACCOUNTING -1
1.154 +#define _POSIX2_PBS_CHECKPOINT -1
1.155 +#define _POSIX2_PBS_LOCATE -1
1.156 +#define _POSIX2_PBS_MESSAGE -1
1.157 +#define _POSIX2_PBS_TRACK -1
1.158 +#define _POSIX2_SW_DEV -1 /* XXX ??? */
1.159 +#define _POSIX2_UPE 200112L
1.160 +#define _V6_ILP32_OFF32 -1
1.161 +#define _V6_ILP32_OFFBIG 0
1.162 +#define _V6_LP64_OFF64 0
1.163 +#define _V6_LPBIG_OFFBIG -1
1.164 +
1.165 +#if __XSI_VISIBLE
1.166 +#define _XOPEN_CRYPT -1 /* XXX ??? */
1.167 +#define _XOPEN_ENH_I18N -1 /* mandatory in XSI */
1.168 +#define _XOPEN_LEGACY -1
1.169 +#define _XOPEN_REALTIME -1
1.170 +#define _XOPEN_REALTIME_THREADS -1
1.171 +#define _XOPEN_UNIX -1
1.172 +#endif
1.173 +
1.174 +/* Define the POSIX.2 version we target for compliance. */
1.175 +#define _POSIX2_VERSION 199212L
1.176 +
1.177 +/*
1.178 + * POSIX-style system configuration variable accessors (for the
1.179 + * sysconf function). The kernel does not directly implement the
1.180 + * sysconf() interface; rather, a C library stub translates references
1.181 + * to sysconf() into calls to sysctl() using a giant switch statement.
1.182 + * Those that are marked `user' are implemented entirely in the C
1.183 + * library and never query the kernel. pathconf() is implemented
1.184 + * directly by the kernel so those are not defined here.
1.185 + */
1.186 +#define _SC_ARG_MAX 1
1.187 +#define _SC_CHILD_MAX 2
1.188 +#define _SC_CLK_TCK 3
1.189 +#define _SC_NGROUPS_MAX 4
1.190 +#define _SC_OPEN_MAX 5
1.191 +#define _SC_JOB_CONTROL 6
1.192 +#define _SC_SAVED_IDS 7
1.193 +#define _SC_VERSION 8
1.194 +#define _SC_BC_BASE_MAX 9 /* user */
1.195 +#define _SC_BC_DIM_MAX 10 /* user */
1.196 +#define _SC_BC_SCALE_MAX 11 /* user */
1.197 +#define _SC_BC_STRING_MAX 12 /* user */
1.198 +#define _SC_COLL_WEIGHTS_MAX 13 /* user */
1.199 +#define _SC_EXPR_NEST_MAX 14 /* user */
1.200 +#define _SC_LINE_MAX 15 /* user */
1.201 +#define _SC_RE_DUP_MAX 16 /* user */
1.202 +#define _SC_2_VERSION 17 /* user */
1.203 +#define _SC_2_C_BIND 18 /* user */
1.204 +#define _SC_2_C_DEV 19 /* user */
1.205 +#define _SC_2_CHAR_TERM 20 /* user */
1.206 +#define _SC_2_FORT_DEV 21 /* user */
1.207 +#define _SC_2_FORT_RUN 22 /* user */
1.208 +#define _SC_2_LOCALEDEF 23 /* user */
1.209 +#define _SC_2_SW_DEV 24 /* user */
1.210 +#define _SC_2_UPE 25 /* user */
1.211 +#define _SC_STREAM_MAX 26 /* user */
1.212 +#define _SC_TZNAME_MAX 27 /* user */
1.213 +
1.214 +#if __POSIX_VISIBLE >= 199309
1.215 +#define _SC_ASYNCHRONOUS_IO 28
1.216 +#define _SC_MAPPED_FILES 29
1.217 +#define _SC_MEMLOCK 30
1.218 +#define _SC_MEMLOCK_RANGE 31
1.219 +#define _SC_MEMORY_PROTECTION 32
1.220 +#define _SC_MESSAGE_PASSING 33
1.221 +#define _SC_PRIORITIZED_IO 34
1.222 +#define _SC_PRIORITY_SCHEDULING 35
1.223 +#define _SC_REALTIME_SIGNALS 36
1.224 +#define _SC_SEMAPHORES 37
1.225 +#define _SC_FSYNC 38
1.226 +#define _SC_SHARED_MEMORY_OBJECTS 39
1.227 +#define _SC_SYNCHRONIZED_IO 40
1.228 +#define _SC_TIMERS 41
1.229 +#define _SC_AIO_LISTIO_MAX 42
1.230 +#define _SC_AIO_MAX 43
1.231 +#define _SC_AIO_PRIO_DELTA_MAX 44
1.232 +#define _SC_DELAYTIMER_MAX 45
1.233 +#define _SC_MQ_OPEN_MAX 46
1.234 +#define _SC_PAGESIZE 47
1.235 +#define _SC_RTSIG_MAX 48
1.236 +#define _SC_SEM_NSEMS_MAX 49
1.237 +#define _SC_SEM_VALUE_MAX 50
1.238 +#define _SC_SIGQUEUE_MAX 51
1.239 +#define _SC_TIMER_MAX 52
1.240 +#endif
1.241 +
1.242 +#if __POSIX_VISIBLE >= 200112
1.243 +#define _SC_2_PBS 59 /* user */
1.244 +#define _SC_2_PBS_ACCOUNTING 60 /* user */
1.245 +#define _SC_2_PBS_CHECKPOINT 61 /* user */
1.246 +#define _SC_2_PBS_LOCATE 62 /* user */
1.247 +#define _SC_2_PBS_MESSAGE 63 /* user */
1.248 +#define _SC_2_PBS_TRACK 64 /* user */
1.249 +#define _SC_ADVISORY_INFO 65
1.250 +#define _SC_BARRIERS 66 /* user */
1.251 +#define _SC_CLOCK_SELECTION 67
1.252 +#define _SC_CPUTIME 68
1.253 +#define _SC_FILE_LOCKING 69
1.254 +#define _SC_GETGR_R_SIZE_MAX 70 /* user */
1.255 +#define _SC_GETPW_R_SIZE_MAX 71 /* user */
1.256 +#define _SC_HOST_NAME_MAX 72
1.257 +#define _SC_LOGIN_NAME_MAX 73
1.258 +#define _SC_MONOTONIC_CLOCK 74
1.259 +#define _SC_MQ_PRIO_MAX 75
1.260 +#define _SC_READER_WRITER_LOCKS 76 /* user */
1.261 +#define _SC_REGEXP 77 /* user */
1.262 +#define _SC_SHELL 78 /* user */
1.263 +#define _SC_SPAWN 79 /* user */
1.264 +#define _SC_SPIN_LOCKS 80 /* user */
1.265 +#define _SC_SPORADIC_SERVER 81
1.266 +#define _SC_THREAD_ATTR_STACKADDR 82 /* user */
1.267 +#define _SC_THREAD_ATTR_STACKSIZE 83 /* user */
1.268 +#define _SC_THREAD_CPUTIME 84 /* user */
1.269 +#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */
1.270 +#define _SC_THREAD_KEYS_MAX 86 /* user */
1.271 +#define _SC_THREAD_PRIO_INHERIT 87 /* user */
1.272 +#define _SC_THREAD_PRIO_PROTECT 88 /* user */
1.273 +#define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */
1.274 +#define _SC_THREAD_PROCESS_SHARED 90 /* user */
1.275 +#define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */
1.276 +#define _SC_THREAD_SPORADIC_SERVER 92 /* user */
1.277 +#define _SC_THREAD_STACK_MIN 93 /* user */
1.278 +#define _SC_THREAD_THREADS_MAX 94 /* user */
1.279 +#define _SC_TIMEOUTS 95 /* user */
1.280 +#define _SC_THREADS 96 /* user */
1.281 +#define _SC_TRACE 97 /* user */
1.282 +#define _SC_TRACE_EVENT_FILTER 98 /* user */
1.283 +#define _SC_TRACE_INHERIT 99 /* user */
1.284 +#define _SC_TRACE_LOG 100 /* user */
1.285 +#define _SC_TTY_NAME_MAX 101 /* user */
1.286 +#define _SC_TYPED_MEMORY_OBJECTS 102
1.287 +#define _SC_V6_ILP32_OFF32 103 /* user */
1.288 +#define _SC_V6_ILP32_OFFBIG 104 /* user */
1.289 +#define _SC_V6_LP64_OFF64 105 /* user */
1.290 +#define _SC_V6_LPBIG_OFFBIG 106 /* user */
1.291 +#define _SC_IPV6 118
1.292 +#define _SC_RAW_SOCKETS 119
1.293 +#define _SC_SYMLOOP_MAX 120
1.294 +#endif
1.295 +
1.296 +#if __XSI_VISIBLE
1.297 +#define _SC_ATEXIT_MAX 107 /* user */
1.298 +#define _SC_IOV_MAX 56
1.299 +#define _SC_PAGE_SIZE _SC_PAGESIZE
1.300 +#define _SC_XOPEN_CRYPT 108 /* user */
1.301 +#define _SC_XOPEN_ENH_I18N 109 /* user */
1.302 +#define _SC_XOPEN_LEGACY 110 /* user */
1.303 +#define _SC_XOPEN_REALTIME 111
1.304 +#define _SC_XOPEN_REALTIME_THREADS 112
1.305 +#define _SC_XOPEN_SHM 113
1.306 +#define _SC_XOPEN_STREAMS 114
1.307 +#define _SC_XOPEN_UNIX 115
1.308 +#define _SC_XOPEN_VERSION 116
1.309 +#define _SC_XOPEN_XCU_VERSION 117 /* user */
1.310 +#endif
1.311 +
1.312 +#if __BSD_VISIBLE
1.313 +#define _SC_NPROCESSORS_CONF 57
1.314 +#define _SC_NPROCESSORS_ONLN 58
1.315 +#endif
1.316 +
1.317 +/* Keys for the confstr(3) function. */
1.318 +#if __POSIX_VISIBLE >= 199209
1.319 +#define _CS_PATH 1 /* default value of PATH */
1.320 +#endif
1.321 +
1.322 +#if __POSIX_VISIBLE >= 200112
1.323 +#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2
1.324 +#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3
1.325 +#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4
1.326 +#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5
1.327 +#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6
1.328 +#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7
1.329 +#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8
1.330 +#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9
1.331 +#define _CS_POSIX_V6_LP64_OFF64_LIBS 10
1.332 +#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11
1.333 +#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12
1.334 +#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13
1.335 +#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14
1.336 +#endif
1.337 +
1.338 +__BEGIN_DECLS
1.339 +/* 1003.1-1990 */
1.340 +IMPORT_C void _exit(int) __dead2;
1.341 +IMPORT_C int access(const char *, int);
1.342 +IMPORT_C int chdir(const char *);
1.343 +IMPORT_C int chown(const char *, uid_t, gid_t);
1.344 +IMPORT_C int close(int);
1.345 +IMPORT_C int dup(int);
1.346 +IMPORT_C int dup2(int, int);
1.347 +int eaccess(const char *, int);
1.348 +IMPORT_C long fpathconf(int, int);
1.349 +IMPORT_C char *getcwd(char *, size_t);
1.350 +IMPORT_C gid_t getegid(void);
1.351 +IMPORT_C uid_t geteuid(void);
1.352 +IMPORT_C gid_t getgid(void);
1.353 +IMPORT_C int getgroups(int, gid_t []);
1.354 +char *getlogin(void);
1.355 +IMPORT_C pid_t getpgrp(void);
1.356 +IMPORT_C pid_t getpid(void);
1.357 +IMPORT_C pid_t getppid(void);
1.358 +IMPORT_C uid_t getuid(void);
1.359 +IMPORT_C int isatty(int);
1.360 +IMPORT_C int link(const char *, const char *);
1.361 +#ifndef _LSEEK_DECLARED
1.362 +#define _LSEEK_DECLARED
1.363 +IMPORT_C off_t lseek(int, off_t, int);
1.364 +
1.365 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
1.366 +#define lseek64 lseek
1.367 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
1.368 +
1.369 +#endif
1.370 +IMPORT_C long pathconf(const char *, int);
1.371 +IMPORT_C int pipe(int *);
1.372 +IMPORT_C ssize_t read(int, void *, size_t);
1.373 +IMPORT_C int rmdir(const char *);
1.374 +IMPORT_C int setgid(gid_t);
1.375 +IMPORT_C int setpgid(pid_t, pid_t);
1.376 +void setproctitle(const char *_fmt, ...) __printf0like(1, 2);
1.377 +IMPORT_C pid_t setsid(void);
1.378 +IMPORT_C int setuid(uid_t);
1.379 +IMPORT_C unsigned int sleep(unsigned int);
1.380 +IMPORT_C
1.381 +long sysconf(int);
1.382 +IMPORT_C int unlink(const char *);
1.383 +IMPORT_C ssize_t write(int, const void *, size_t);
1.384 +/* 1003.2-1992 */
1.385 +#if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE
1.386 +IMPORT_C size_t confstr(int, char *, size_t);
1.387 +#ifndef _GETOPT_DECLARED
1.388 +#define _GETOPT_DECLARED
1.389 +IMPORT_C int getopt(int, char * const [], const char *);
1.390 +
1.391 +#ifndef __SYMBIAN32__
1.392 +extern char *optarg; /* getopt(3) external variables */
1.393 +extern int optind, opterr, optopt;
1.394 +#else
1.395 +IMPORT_C int *__optopt(void);
1.396 +IMPORT_C int *__opterr(void);
1.397 +IMPORT_C int *__optind(void);
1.398 +IMPORT_C char **__optarg(void);
1.399 +#define optopt (*__optopt())
1.400 +#define opterr (*__opterr())
1.401 +#define optind (*__optind())
1.402 +#define optarg (*__optarg())
1.403 +#endif /* __SYMBIAN32__ */
1.404 +
1.405 +#endif /* _GETOPT_DECLARED */
1.406 +#endif
1.407 +
1.408 +/* ISO/IEC 9945-1: 1996 */
1.409 +#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
1.410 +IMPORT_C int fsync(int);
1.411 +IMPORT_C int fdatasync(int);
1.412 +/*
1.413 + * ftruncate() was in the POSIX Realtime Extension (it's used for shared
1.414 + * memory), but truncate() was not.
1.415 + */
1.416 +#ifndef _FTRUNCATE_DECLARED
1.417 +#define _FTRUNCATE_DECLARED
1.418 +IMPORT_C int ftruncate(int, off_t);
1.419 +
1.420 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
1.421 +#define ftruncate64 ftruncate
1.422 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
1.423 +
1.424 +#endif
1.425 +#endif
1.426 +
1.427 +#if __POSIX_VISIBLE >= 199506
1.428 +
1.429 +#ifndef __SYMBIAN32__
1.430 +int getlogin_r(char *, int);
1.431 +#endif //__SYMBIAN32__
1.432 +
1.433 +#endif
1.434 +
1.435 +/* 1003.1-2001 */
1.436 +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
1.437 +IMPORT_C int readlink(const char *, char *, int);
1.438 +#endif
1.439 +#if __POSIX_VISIBLE >= 200112
1.440 +IMPORT_C int gethostname(char *, size_t);
1.441 +IMPORT_C int setegid(gid_t);
1.442 +IMPORT_C int seteuid(uid_t);
1.443 +#endif
1.444 +
1.445 +/*
1.446 + * symlink() was originally in POSIX.1a, which was withdrawn after
1.447 + * being overtaken by events (1003.1-2001). It was in XPG4.2, and of
1.448 + * course has been in BSD since 4.2.
1.449 + */
1.450 +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE
1.451 +IMPORT_C int symlink(const char * __restrict, const char * __restrict);
1.452 +#endif
1.453 +
1.454 +/* X/Open System Interfaces */
1.455 +#if __XSI_VISIBLE
1.456 +char *crypt(const char *, const char *);
1.457 +/* char *ctermid(char *); */ /* XXX ??? */
1.458 +int encrypt(char *, int);
1.459 +IMPORT_C int fchdir(int);
1.460 +IMPORT_C int getpgid(pid_t _pid);
1.461 +IMPORT_C int lchown(const char *, uid_t, gid_t);
1.462 +IMPORT_C int nice(int);
1.463 +IMPORT_C int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */
1.464 +IMPORT_C int setregid(gid_t, gid_t);
1.465 +IMPORT_C int setreuid(uid_t, uid_t);
1.466 +
1.467 +#ifndef _SWAB_DECLARED
1.468 +#define _SWAB_DECLARED
1.469 +IMPORT_C
1.470 +void swab(const void * __restrict, void * __restrict, ssize_t);
1.471 +#endif /* _SWAB_DECLARED */
1.472 +
1.473 +void sync(void);
1.474 +IMPORT_C int usleep(useconds_t);
1.475 +
1.476 +IMPORT_C unsigned int alarm(unsigned int seconds);
1.477 +
1.478 +/* See comment at ftruncate() above. */
1.479 +#ifndef _TRUNCATE_DECLARED
1.480 +#define _TRUNCATE_DECLARED
1.481 +IMPORT_C int truncate(const char *, off_t);
1.482 +
1.483 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
1.484 +#define truncate64 truncate
1.485 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
1.486 +
1.487 +#endif
1.488 +#endif /* __XSI_VISIBLE */
1.489 +
1.490 +#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
1.491 +IMPORT_C int brk(const void *);
1.492 +IMPORT_C int getdtablesize(void);
1.493 +IMPORT_C int getpagesize(void) __pure2;
1.494 +#endif
1.495 +
1.496 +#if __BSD_VISIBLE
1.497 +struct timeval; /* select(2) */
1.498 +IMPORT_C int initgroups(const char *, gid_t);
1.499 +IMPORT_C int issetugid(void);
1.500 +
1.501 +#ifdef __SYMBIAN_COMPILE_UNUSED__
1.502 +char *mkdtemp(char *);
1.503 +#endif
1.504 +
1.505 +#ifndef _MKNOD_DECLARED
1.506 +int mknod(const char *, mode_t, dev_t);
1.507 +#define _MKNOD_DECLARED
1.508 +#endif
1.509 +#ifndef _MKSTEMP_DECLARED
1.510 +IMPORT_C int mkstemp(char *);
1.511 +
1.512 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
1.513 +#define mkstemp64 mkstemp
1.514 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
1.515 +
1.516 +#define _MKSTEMP_DECLARED
1.517 +#endif
1.518 +
1.519 +#ifdef __SYMBIAN_COMPILE_UNUSED__
1.520 +int mkstemps(char *, int);
1.521 +#endif
1.522 +
1.523 +#ifndef _MKTEMP_DECLARED
1.524 +
1.525 +#ifdef __SYMBIAN_COMPILE_UNUSED__
1.526 +char *mktemp(char *);
1.527 +#endif
1.528 +
1.529 +#define _MKTEMP_DECLARED
1.530 +#endif
1.531 +int nfssvc(int, void *);
1.532 +
1.533 +#if __BSD_VISIBLE
1.534 +#ifndef __SYMBIAN32__
1.535 +#ifndef _SELECT_DECLARED
1.536 +#define _SELECT_DECLARED
1.537 +IMPORT_C int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
1.538 +#endif // _SELECT_DECLARED
1.539 +#endif // __SYMBIAN32__
1.540 +#endif // __BSD_VISIBLE
1.541 +
1.542 +IMPORT_C int setgroups(int, const gid_t *);
1.543 +#ifndef _SETKEY_DECLARED
1.544 +int setkey(const char *);
1.545 +#define _SETKEY_DECLARED
1.546 +#endif
1.547 +
1.548 +#ifndef _OPTRESET_DECLARED
1.549 +#define _OPTRESET_DECLARED
1.550 +#ifndef __SYMBIAN32__
1.551 +extern int optreset; /* getopt(3) external variable */
1.552 +#else
1.553 +IMPORT_C int *__optreset(void);
1.554 +#define optreset (*__optreset())
1.555 +#endif /* __SYMBIAN32__ */
1.556 +
1.557 +#ifdef __SYMBIAN32__
1.558 +#ifndef __XSI_VISIBLE
1.559 +void encrypt(char block[], int edflag);
1.560 +char *crypt(const char *key, const char *salt);
1.561 +#endif /* ifdef __SYMBIAN32__ */
1.562 +#endif /* ifndef __XSI_VISIBLE */
1.563 +
1.564 +#endif /* _OPTRESET_DECLARED */
1.565 +#endif /* __BSD_VISIBLE */
1.566 +__END_DECLS
1.567 +
1.568 +//---
1.569 +#ifdef __cplusplus
1.570 +}
1.571 +#endif
1.572 +//---
1.573 +
1.574 +#endif /* !_UNISTD_H_ */