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