williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description:
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
/**
|
williamr@2
|
21 |
@file
|
williamr@4
|
22 |
@PublishedAll
|
williamr@2
|
23 |
*/
|
williamr@2
|
24 |
|
williamr@2
|
25 |
#ifndef _SYS_UNISTD_H
|
williamr@2
|
26 |
#define _SYS_UNISTD_H
|
williamr@2
|
27 |
#ifdef __cplusplus
|
williamr@2
|
28 |
extern "C" {
|
williamr@2
|
29 |
#endif
|
williamr@2
|
30 |
#include <_ansi.h>
|
williamr@2
|
31 |
#include <sys/types.h>
|
williamr@2
|
32 |
#define __need_size_t
|
williamr@2
|
33 |
#include <stddef.h>
|
williamr@2
|
34 |
|
williamr@2
|
35 |
IMPORT_C int access (const char *_path, int _amode );
|
williamr@2
|
36 |
IMPORT_C int waccess (const wchar_t *_path, int _amode );
|
williamr@2
|
37 |
IMPORT_C int chdir (const char *_path );
|
williamr@2
|
38 |
IMPORT_C int wchdir (const wchar_t *_path );
|
williamr@2
|
39 |
IMPORT_C int chmod (const char *_path, mode_t _mode );
|
williamr@2
|
40 |
IMPORT_C int wchmod (const wchar_t *_path, mode_t _mode );
|
williamr@2
|
41 |
IMPORT_C int close (int _fildes );
|
williamr@2
|
42 |
IMPORT_C int dup (int _fildes );
|
williamr@2
|
43 |
IMPORT_C int dup2 (int _fildes, int _fildes2 );
|
williamr@2
|
44 |
IMPORT_C int fsync (int _fildes );
|
williamr@2
|
45 |
IMPORT_C char* getcwd (char *_buf, size_t _size );
|
williamr@2
|
46 |
IMPORT_C wchar_t* wgetcwd (wchar_t *_buf, size_t _size );
|
williamr@2
|
47 |
IMPORT_C int gethostname (char *_buf, size_t _size );
|
williamr@2
|
48 |
IMPORT_C int isatty (int _fildes );
|
williamr@2
|
49 |
IMPORT_C off_t lseek (int _fildes, off_t _offset, int _whence );
|
williamr@2
|
50 |
IMPORT_C int open (const char *, int, ...);
|
williamr@2
|
51 |
IMPORT_C int wopen (const wchar_t *, int, ...);
|
williamr@2
|
52 |
IMPORT_C int read (int _fildes, char *_buf, size_t _nbyte );
|
williamr@2
|
53 |
IMPORT_C int rename (const char *, const char *);
|
williamr@2
|
54 |
IMPORT_C int wrename (const wchar_t *, const wchar_t *);
|
williamr@2
|
55 |
IMPORT_C int rmdir (const char *_path );
|
williamr@2
|
56 |
IMPORT_C int wrmdir (const wchar_t *_path );
|
williamr@2
|
57 |
IMPORT_C int unlink (const char *_path );
|
williamr@2
|
58 |
IMPORT_C int wunlink (const wchar_t *_path );
|
williamr@2
|
59 |
IMPORT_C int write (int _fildes, const char *_buf, size_t _nbyte );
|
williamr@2
|
60 |
IMPORT_C void _exit (int _status ) _ATTRIBUTE((noreturn));
|
williamr@2
|
61 |
|
williamr@2
|
62 |
/**
|
williamr@2
|
63 |
NB. open is also declared in fcntl.h
|
williamr@2
|
64 |
@publishedAll
|
williamr@2
|
65 |
@released
|
williamr@2
|
66 |
*/
|
williamr@2
|
67 |
IMPORT_C pid_t getpid (void );
|
williamr@2
|
68 |
/**
|
williamr@2
|
69 |
@publishedAll
|
williamr@2
|
70 |
@released
|
williamr@2
|
71 |
*/
|
williamr@2
|
72 |
IMPORT_C unsigned sleep (unsigned int _seconds );
|
williamr@2
|
73 |
|
williamr@2
|
74 |
#define remove(x) unlink(x)
|
williamr@2
|
75 |
#define wremove(x) wunlink(x)
|
williamr@2
|
76 |
|
williamr@2
|
77 |
unsigned alarm (unsigned _secs );
|
williamr@2
|
78 |
int chown (const char *_path, uid_t _owner, gid_t _group );
|
williamr@2
|
79 |
char *ctermid (char *_s );
|
williamr@2
|
80 |
char *cuserid (char *_s );
|
williamr@2
|
81 |
int execl (const char *_path, const char *, ... );
|
williamr@2
|
82 |
int execle (const char *_path, const char *, ... );
|
williamr@2
|
83 |
int execlp (const char *_file, const char *, ... );
|
williamr@2
|
84 |
int execv (const char *_path, char * const _argv[] );
|
williamr@2
|
85 |
int execve (const char *_path, char * const _argv[], char * const _envp[] );
|
williamr@2
|
86 |
int execvp (const char *_file, char * const _argv[] );
|
williamr@2
|
87 |
pid_t fork (void );
|
williamr@2
|
88 |
long fpathconf (int _fd, int _name );
|
williamr@2
|
89 |
gid_t getegid (void );
|
williamr@2
|
90 |
uid_t geteuid (void );
|
williamr@2
|
91 |
gid_t getgid (void );
|
williamr@2
|
92 |
int getgroups (int _gidsetsize, gid_t _grouplist[] );
|
williamr@2
|
93 |
char *getlogin (void );
|
williamr@2
|
94 |
size_t getpagesize (void);
|
williamr@2
|
95 |
pid_t getpgrp (void );
|
williamr@2
|
96 |
pid_t getppid (void );
|
williamr@2
|
97 |
uid_t getuid (void );
|
williamr@2
|
98 |
int link (const char *_path1, const char *_path2 );
|
williamr@2
|
99 |
long pathconf (char *_path, int _name );
|
williamr@2
|
100 |
int pause (void );
|
williamr@2
|
101 |
int pipe (int _fildes[2] );
|
williamr@2
|
102 |
void * sbrk (size_t incr);
|
williamr@2
|
103 |
int setgid (gid_t _gid );
|
williamr@2
|
104 |
int setpgid (pid_t _pid, pid_t _pgid );
|
williamr@2
|
105 |
pid_t setsid (void );
|
williamr@2
|
106 |
int setuid (uid_t _uid );
|
williamr@2
|
107 |
long sysconf (int _name );
|
williamr@2
|
108 |
pid_t tcgetpgrp (int _fildes );
|
williamr@2
|
109 |
int tcsetpgrp (int _fildes, pid_t _pgrp_id );
|
williamr@2
|
110 |
char *ttyname (int _fildes );
|
williamr@2
|
111 |
|
williamr@2
|
112 |
long sysconf (int _name);
|
williamr@2
|
113 |
|
williamr@2
|
114 |
# define _SC_ARG_MAX 0
|
williamr@2
|
115 |
# define _SC_CHILD_MAX 1
|
williamr@2
|
116 |
# define _SC_CLK_TCK 2
|
williamr@2
|
117 |
# define _SC_NGROUPS_MAX 3
|
williamr@2
|
118 |
# define _SC_OPEN_MAX 4
|
williamr@2
|
119 |
/* no _SC_STREAM_MAX */
|
williamr@2
|
120 |
# define _SC_JOB_CONTROL 5
|
williamr@2
|
121 |
# define _SC_SAVED_IDS 6
|
williamr@2
|
122 |
# define _SC_VERSION 7
|
williamr@2
|
123 |
# define _SC_PAGESIZE 8
|
williamr@2
|
124 |
# define _PC_LINK_MAX 0
|
williamr@2
|
125 |
# define _PC_MAX_CANON 1
|
williamr@2
|
126 |
# define _PC_MAX_INPUT 2
|
williamr@2
|
127 |
# define _PC_NAME_MAX 3
|
williamr@2
|
128 |
# define _PC_PATH_MAX 4
|
williamr@2
|
129 |
# define _PC_PIPE_BUF 5
|
williamr@2
|
130 |
# define _PC_CHOWN_RESTRICTED 6
|
williamr@2
|
131 |
# define _PC_NO_TRUNC 7
|
williamr@2
|
132 |
# define _PC_VDISABLE 8
|
williamr@2
|
133 |
|
williamr@2
|
134 |
# define F_OK 0
|
williamr@2
|
135 |
# define R_OK 4
|
williamr@2
|
136 |
# define W_OK 2
|
williamr@2
|
137 |
# define X_OK 1
|
williamr@2
|
138 |
|
williamr@2
|
139 |
# define SEEK_SET 0
|
williamr@2
|
140 |
# define SEEK_CUR 1
|
williamr@2
|
141 |
# define SEEK_END 2
|
williamr@2
|
142 |
|
williamr@2
|
143 |
#ifdef __svr4__
|
williamr@2
|
144 |
# define _POSIX_JOB_CONTROL 1
|
williamr@2
|
145 |
# define _POSIX_SAVED_IDS 1
|
williamr@2
|
146 |
# define _POSIX_VERSION 199009L
|
williamr@2
|
147 |
#endif
|
williamr@2
|
148 |
/**
|
williamr@2
|
149 |
@publishedAll
|
williamr@2
|
150 |
@released
|
williamr@2
|
151 |
*/
|
williamr@2
|
152 |
#define STDIN_FILENO 0 /* standard input file descriptor */
|
williamr@2
|
153 |
/**
|
williamr@2
|
154 |
@publishedAll
|
williamr@2
|
155 |
@released
|
williamr@2
|
156 |
*/
|
williamr@2
|
157 |
#define STDOUT_FILENO 1 /* standard output file descriptor */
|
williamr@2
|
158 |
/**
|
williamr@2
|
159 |
@publishedAll
|
williamr@2
|
160 |
@released
|
williamr@2
|
161 |
*/
|
williamr@2
|
162 |
#define STDERR_FILENO 2 /* standard error file descriptor */
|
williamr@2
|
163 |
|
williamr@2
|
164 |
# ifndef _POSIX_SOURCE
|
williamr@2
|
165 |
# define MAXNAMLEN 256 /* E32STD.H: KMaxName */
|
williamr@2
|
166 |
# endif /* _POSIX_SOURCE */
|
williamr@2
|
167 |
|
williamr@2
|
168 |
# define MAXPATHLEN 256 /* E32STD.H: KMaxFullName */
|
williamr@2
|
169 |
|
williamr@2
|
170 |
#ifdef __cplusplus
|
williamr@2
|
171 |
}
|
williamr@2
|
172 |
#endif
|
williamr@2
|
173 |
#endif
|