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