2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
31 #include <sys/types.h>
35 IMPORT_C int access (const char *_path, int _amode );
36 IMPORT_C int waccess (const wchar_t *_path, int _amode );
37 IMPORT_C int chdir (const char *_path );
38 IMPORT_C int wchdir (const wchar_t *_path );
39 IMPORT_C int chmod (const char *_path, mode_t _mode );
40 IMPORT_C int wchmod (const wchar_t *_path, mode_t _mode );
41 IMPORT_C int close (int _fildes );
42 IMPORT_C int dup (int _fildes );
43 IMPORT_C int dup2 (int _fildes, int _fildes2 );
44 IMPORT_C int fsync (int _fildes );
45 IMPORT_C char* getcwd (char *_buf, size_t _size );
46 IMPORT_C wchar_t* wgetcwd (wchar_t *_buf, size_t _size );
47 IMPORT_C int gethostname (char *_buf, size_t _size );
48 IMPORT_C int isatty (int _fildes );
49 IMPORT_C off_t lseek (int _fildes, off_t _offset, int _whence );
50 IMPORT_C int open (const char *, int, ...);
51 IMPORT_C int wopen (const wchar_t *, int, ...);
52 IMPORT_C int read (int _fildes, char *_buf, size_t _nbyte );
53 IMPORT_C int rename (const char *, const char *);
54 IMPORT_C int wrename (const wchar_t *, const wchar_t *);
55 IMPORT_C int rmdir (const char *_path );
56 IMPORT_C int wrmdir (const wchar_t *_path );
57 IMPORT_C int unlink (const char *_path );
58 IMPORT_C int wunlink (const wchar_t *_path );
59 IMPORT_C int write (int _fildes, const char *_buf, size_t _nbyte );
60 IMPORT_C void _exit (int _status ) _ATTRIBUTE((noreturn));
63 NB. open is also declared in fcntl.h
67 IMPORT_C pid_t getpid (void );
72 IMPORT_C unsigned sleep (unsigned int _seconds );
74 #define remove(x) unlink(x)
75 #define wremove(x) wunlink(x)
77 unsigned alarm (unsigned _secs );
78 int chown (const char *_path, uid_t _owner, gid_t _group );
79 char *ctermid (char *_s );
80 char *cuserid (char *_s );
81 int execl (const char *_path, const char *, ... );
82 int execle (const char *_path, const char *, ... );
83 int execlp (const char *_file, const char *, ... );
84 int execv (const char *_path, char * const _argv[] );
85 int execve (const char *_path, char * const _argv[], char * const _envp[] );
86 int execvp (const char *_file, char * const _argv[] );
88 long fpathconf (int _fd, int _name );
89 gid_t getegid (void );
90 uid_t geteuid (void );
92 int getgroups (int _gidsetsize, gid_t _grouplist[] );
93 char *getlogin (void );
94 size_t getpagesize (void);
95 pid_t getpgrp (void );
96 pid_t getppid (void );
98 int link (const char *_path1, const char *_path2 );
99 long pathconf (char *_path, int _name );
101 int pipe (int _fildes[2] );
102 void * sbrk (size_t incr);
103 int setgid (gid_t _gid );
104 int setpgid (pid_t _pid, pid_t _pgid );
105 pid_t setsid (void );
106 int setuid (uid_t _uid );
107 long sysconf (int _name );
108 pid_t tcgetpgrp (int _fildes );
109 int tcsetpgrp (int _fildes, pid_t _pgrp_id );
110 char *ttyname (int _fildes );
112 long sysconf (int _name);
114 # define _SC_ARG_MAX 0
115 # define _SC_CHILD_MAX 1
116 # define _SC_CLK_TCK 2
117 # define _SC_NGROUPS_MAX 3
118 # define _SC_OPEN_MAX 4
119 /* no _SC_STREAM_MAX */
120 # define _SC_JOB_CONTROL 5
121 # define _SC_SAVED_IDS 6
122 # define _SC_VERSION 7
123 # define _SC_PAGESIZE 8
124 # define _PC_LINK_MAX 0
125 # define _PC_MAX_CANON 1
126 # define _PC_MAX_INPUT 2
127 # define _PC_NAME_MAX 3
128 # define _PC_PATH_MAX 4
129 # define _PC_PIPE_BUF 5
130 # define _PC_CHOWN_RESTRICTED 6
131 # define _PC_NO_TRUNC 7
132 # define _PC_VDISABLE 8
144 # define _POSIX_JOB_CONTROL 1
145 # define _POSIX_SAVED_IDS 1
146 # define _POSIX_VERSION 199009L
152 #define STDIN_FILENO 0 /* standard input file descriptor */
157 #define STDOUT_FILENO 1 /* standard output file descriptor */
162 #define STDERR_FILENO 2 /* standard error file descriptor */
164 # ifndef _POSIX_SOURCE
165 # define MAXNAMLEN 256 /* E32STD.H: KMaxName */
166 # endif /* _POSIX_SOURCE */
168 # define MAXPATHLEN 256 /* E32STD.H: KMaxFullName */