williamr@2: /* williamr@2: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@4: @PublishedAll williamr@2: */ williamr@2: williamr@2: #ifndef _SYS_UNISTD_H williamr@2: #define _SYS_UNISTD_H williamr@2: #ifdef __cplusplus williamr@2: extern "C" { williamr@2: #endif williamr@2: #include <_ansi.h> williamr@2: #include williamr@2: #define __need_size_t williamr@2: #include williamr@2: williamr@2: IMPORT_C int access (const char *_path, int _amode ); williamr@2: IMPORT_C int waccess (const wchar_t *_path, int _amode ); williamr@2: IMPORT_C int chdir (const char *_path ); williamr@2: IMPORT_C int wchdir (const wchar_t *_path ); williamr@2: IMPORT_C int chmod (const char *_path, mode_t _mode ); williamr@2: IMPORT_C int wchmod (const wchar_t *_path, mode_t _mode ); williamr@2: IMPORT_C int close (int _fildes ); williamr@2: IMPORT_C int dup (int _fildes ); williamr@2: IMPORT_C int dup2 (int _fildes, int _fildes2 ); williamr@2: IMPORT_C int fsync (int _fildes ); williamr@2: IMPORT_C char* getcwd (char *_buf, size_t _size ); williamr@2: IMPORT_C wchar_t* wgetcwd (wchar_t *_buf, size_t _size ); williamr@2: IMPORT_C int gethostname (char *_buf, size_t _size ); williamr@2: IMPORT_C int isatty (int _fildes ); williamr@2: IMPORT_C off_t lseek (int _fildes, off_t _offset, int _whence ); williamr@2: IMPORT_C int open (const char *, int, ...); williamr@2: IMPORT_C int wopen (const wchar_t *, int, ...); williamr@2: IMPORT_C int read (int _fildes, char *_buf, size_t _nbyte ); williamr@2: IMPORT_C int rename (const char *, const char *); williamr@2: IMPORT_C int wrename (const wchar_t *, const wchar_t *); williamr@2: IMPORT_C int rmdir (const char *_path ); williamr@2: IMPORT_C int wrmdir (const wchar_t *_path ); williamr@2: IMPORT_C int unlink (const char *_path ); williamr@2: IMPORT_C int wunlink (const wchar_t *_path ); williamr@2: IMPORT_C int write (int _fildes, const char *_buf, size_t _nbyte ); williamr@2: IMPORT_C void _exit (int _status ) _ATTRIBUTE((noreturn)); williamr@2: williamr@2: /** williamr@2: NB. open is also declared in fcntl.h williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: IMPORT_C pid_t getpid (void ); williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: IMPORT_C unsigned sleep (unsigned int _seconds ); williamr@2: williamr@2: #define remove(x) unlink(x) williamr@2: #define wremove(x) wunlink(x) williamr@2: williamr@2: unsigned alarm (unsigned _secs ); williamr@2: int chown (const char *_path, uid_t _owner, gid_t _group ); williamr@2: char *ctermid (char *_s ); williamr@2: char *cuserid (char *_s ); williamr@2: int execl (const char *_path, const char *, ... ); williamr@2: int execle (const char *_path, const char *, ... ); williamr@2: int execlp (const char *_file, const char *, ... ); williamr@2: int execv (const char *_path, char * const _argv[] ); williamr@2: int execve (const char *_path, char * const _argv[], char * const _envp[] ); williamr@2: int execvp (const char *_file, char * const _argv[] ); williamr@2: pid_t fork (void ); williamr@2: long fpathconf (int _fd, int _name ); williamr@2: gid_t getegid (void ); williamr@2: uid_t geteuid (void ); williamr@2: gid_t getgid (void ); williamr@2: int getgroups (int _gidsetsize, gid_t _grouplist[] ); williamr@2: char *getlogin (void ); williamr@2: size_t getpagesize (void); williamr@2: pid_t getpgrp (void ); williamr@2: pid_t getppid (void ); williamr@2: uid_t getuid (void ); williamr@2: int link (const char *_path1, const char *_path2 ); williamr@2: long pathconf (char *_path, int _name ); williamr@2: int pause (void ); williamr@2: int pipe (int _fildes[2] ); williamr@2: void * sbrk (size_t incr); williamr@2: int setgid (gid_t _gid ); williamr@2: int setpgid (pid_t _pid, pid_t _pgid ); williamr@2: pid_t setsid (void ); williamr@2: int setuid (uid_t _uid ); williamr@2: long sysconf (int _name ); williamr@2: pid_t tcgetpgrp (int _fildes ); williamr@2: int tcsetpgrp (int _fildes, pid_t _pgrp_id ); williamr@2: char *ttyname (int _fildes ); williamr@2: williamr@2: long sysconf (int _name); williamr@2: williamr@2: # define _SC_ARG_MAX 0 williamr@2: # define _SC_CHILD_MAX 1 williamr@2: # define _SC_CLK_TCK 2 williamr@2: # define _SC_NGROUPS_MAX 3 williamr@2: # define _SC_OPEN_MAX 4 williamr@2: /* no _SC_STREAM_MAX */ williamr@2: # define _SC_JOB_CONTROL 5 williamr@2: # define _SC_SAVED_IDS 6 williamr@2: # define _SC_VERSION 7 williamr@2: # define _SC_PAGESIZE 8 williamr@2: # define _PC_LINK_MAX 0 williamr@2: # define _PC_MAX_CANON 1 williamr@2: # define _PC_MAX_INPUT 2 williamr@2: # define _PC_NAME_MAX 3 williamr@2: # define _PC_PATH_MAX 4 williamr@2: # define _PC_PIPE_BUF 5 williamr@2: # define _PC_CHOWN_RESTRICTED 6 williamr@2: # define _PC_NO_TRUNC 7 williamr@2: # define _PC_VDISABLE 8 williamr@2: williamr@2: # define F_OK 0 williamr@2: # define R_OK 4 williamr@2: # define W_OK 2 williamr@2: # define X_OK 1 williamr@2: williamr@2: # define SEEK_SET 0 williamr@2: # define SEEK_CUR 1 williamr@2: # define SEEK_END 2 williamr@2: williamr@2: #ifdef __svr4__ williamr@2: # define _POSIX_JOB_CONTROL 1 williamr@2: # define _POSIX_SAVED_IDS 1 williamr@2: # define _POSIX_VERSION 199009L williamr@2: #endif williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: #define STDIN_FILENO 0 /* standard input file descriptor */ williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: #define STDOUT_FILENO 1 /* standard output file descriptor */ williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: #define STDERR_FILENO 2 /* standard error file descriptor */ williamr@2: williamr@2: # ifndef _POSIX_SOURCE williamr@2: # define MAXNAMLEN 256 /* E32STD.H: KMaxName */ williamr@2: # endif /* _POSIX_SOURCE */ williamr@2: williamr@2: # define MAXPATHLEN 256 /* E32STD.H: KMaxFullName */ williamr@2: williamr@2: #ifdef __cplusplus williamr@2: } williamr@2: #endif williamr@2: #endif