epoc32/include/libc/sys/unistd.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/libc/sys/unistd.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/libc/sys/unistd.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,176 @@
     1.4 -unistd.h
     1.5 +/*
     1.6 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +
    1.25 +
    1.26 +
    1.27 +/**
    1.28 + @file
    1.29 + @internalComponent
    1.30 +*/
    1.31 +
    1.32 +#ifndef _SYS_UNISTD_H
    1.33 +#define _SYS_UNISTD_H
    1.34 +#ifdef __cplusplus
    1.35 +extern "C" {
    1.36 +#endif
    1.37 +#include <_ansi.h>
    1.38 +#include <sys/types.h>
    1.39 +#define __need_size_t
    1.40 +#include <stddef.h>
    1.41 +
    1.42 +IMPORT_C int	access		(const char *_path, int _amode );
    1.43 +IMPORT_C int	waccess		(const wchar_t *_path, int _amode );
    1.44 +IMPORT_C int    chdir		(const char *_path );
    1.45 +IMPORT_C int    wchdir		(const wchar_t *_path );
    1.46 +IMPORT_C int    chmod		(const char *_path, mode_t _mode );
    1.47 +IMPORT_C int    wchmod		(const wchar_t *_path, mode_t _mode );
    1.48 +IMPORT_C int    close		(int _fildes );
    1.49 +IMPORT_C int    dup		(int _fildes );
    1.50 +IMPORT_C int    dup2		(int _fildes, int _fildes2 );
    1.51 +IMPORT_C int    fsync		(int _fildes );
    1.52 +IMPORT_C char*	getcwd		(char *_buf, size_t _size );
    1.53 +IMPORT_C wchar_t*	wgetcwd		(wchar_t *_buf, size_t _size );
    1.54 +IMPORT_C int	gethostname	(char *_buf, size_t _size );
    1.55 +IMPORT_C int    isatty		(int _fildes );
    1.56 +IMPORT_C off_t  lseek		(int _fildes, off_t _offset, int _whence );
    1.57 +IMPORT_C int	open		(const char *, int, ...);
    1.58 +IMPORT_C int	wopen		(const wchar_t *, int, ...);
    1.59 +IMPORT_C int    read		(int _fildes, char *_buf, size_t _nbyte );
    1.60 +IMPORT_C int	rename		(const char *, const char *);
    1.61 +IMPORT_C int	wrename		(const wchar_t *, const wchar_t *);
    1.62 +IMPORT_C int    rmdir		(const char *_path );
    1.63 +IMPORT_C int    wrmdir		(const wchar_t *_path );
    1.64 +IMPORT_C int    unlink		(const char *_path );
    1.65 +IMPORT_C int    wunlink		(const wchar_t *_path );
    1.66 +IMPORT_C int    write		(int _fildes, const char *_buf, size_t _nbyte );
    1.67 +IMPORT_C void	_exit		(int _status ) _ATTRIBUTE((noreturn));
    1.68 +
    1.69 +/** 
    1.70 +NB. open is also declared in fcntl.h 
    1.71 +@publishedAll
    1.72 +@released
    1.73 +*/
    1.74 +IMPORT_C pid_t   getpid		(void );
    1.75 +/**
    1.76 +@publishedAll
    1.77 +@released
    1.78 +*/
    1.79 +IMPORT_C unsigned sleep		(unsigned int _seconds );
    1.80 +
    1.81 +#define remove(x)       unlink(x)
    1.82 +#define wremove(x)       wunlink(x)
    1.83 +
    1.84 +unsigned  alarm		(unsigned _secs );
    1.85 +int     chown		(const char *_path, uid_t _owner, gid_t _group );
    1.86 +char    *ctermid	(char *_s );
    1.87 +char    *cuserid	(char *_s );
    1.88 +int     execl		(const char *_path, const char *, ... );
    1.89 +int     execle		(const char *_path, const char *, ... );
    1.90 +int     execlp		(const char *_file, const char *, ... );
    1.91 +int     execv		(const char *_path, char * const _argv[] );
    1.92 +int     execve		(const char *_path, char * const _argv[], char * const _envp[] );
    1.93 +int     execvp		(const char *_file, char * const _argv[] );
    1.94 +pid_t   fork		(void );
    1.95 +long    fpathconf	(int _fd, int _name );
    1.96 +gid_t   getegid		(void );
    1.97 +uid_t   geteuid		(void );
    1.98 +gid_t   getgid		(void );
    1.99 +int     getgroups	(int _gidsetsize, gid_t _grouplist[] );
   1.100 +char    *getlogin	(void );
   1.101 +size_t  getpagesize	(void);
   1.102 +pid_t   getpgrp		(void );
   1.103 +pid_t   getppid		(void );
   1.104 +uid_t   getuid		(void );
   1.105 +int     link		(const char *_path1, const char *_path2 );
   1.106 +long    pathconf	(char *_path, int _name );
   1.107 +int     pause		(void );
   1.108 +int     pipe		(int _fildes[2] );
   1.109 +void *  sbrk		(size_t incr);
   1.110 +int     setgid		(gid_t _gid );
   1.111 +int     setpgid		(pid_t _pid, pid_t _pgid );
   1.112 +pid_t   setsid		(void );
   1.113 +int     setuid		(uid_t _uid );
   1.114 +long    sysconf		(int _name );
   1.115 +pid_t   tcgetpgrp	(int _fildes );
   1.116 +int     tcsetpgrp	(int _fildes, pid_t _pgrp_id );
   1.117 +char    *ttyname	(int _fildes );
   1.118 +
   1.119 +long	sysconf		(int _name);
   1.120 +
   1.121 +# define	_SC_ARG_MAX	0
   1.122 +# define	_SC_CHILD_MAX	1
   1.123 +# define	_SC_CLK_TCK	2
   1.124 +# define	_SC_NGROUPS_MAX	3
   1.125 +# define	_SC_OPEN_MAX	4
   1.126 +/* no _SC_STREAM_MAX */
   1.127 +# define	_SC_JOB_CONTROL	5
   1.128 +# define	_SC_SAVED_IDS	6
   1.129 +# define	_SC_VERSION	7
   1.130 +# define        _SC_PAGESIZE    8
   1.131 +# define	_PC_LINK_MAX	0
   1.132 +# define	_PC_MAX_CANON	1
   1.133 +# define	_PC_MAX_INPUT	2
   1.134 +# define	_PC_NAME_MAX	3
   1.135 +# define	_PC_PATH_MAX	4
   1.136 +# define	_PC_PIPE_BUF	5
   1.137 +# define	_PC_CHOWN_RESTRICTED	6
   1.138 +# define	_PC_NO_TRUNC	7
   1.139 +# define	_PC_VDISABLE	8
   1.140 +
   1.141 +# define	F_OK	0
   1.142 +# define	R_OK	4
   1.143 +# define	W_OK	2
   1.144 +# define	X_OK	1
   1.145 +
   1.146 +# define	SEEK_SET	0
   1.147 +# define	SEEK_CUR	1
   1.148 +# define	SEEK_END	2
   1.149 +
   1.150 +#ifdef __svr4__
   1.151 +# define _POSIX_JOB_CONTROL	1
   1.152 +# define _POSIX_SAVED_IDS	1
   1.153 +# define _POSIX_VERSION	199009L
   1.154 +#endif
   1.155 +/**
   1.156 +@publishedAll
   1.157 +@released
   1.158 +*/
   1.159 +#define STDIN_FILENO    0       /* standard input file descriptor */
   1.160 +/**
   1.161 +@publishedAll
   1.162 +@released
   1.163 +*/
   1.164 +#define STDOUT_FILENO   1       /* standard output file descriptor */
   1.165 +/**
   1.166 +@publishedAll
   1.167 +@released
   1.168 +*/
   1.169 +#define STDERR_FILENO   2       /* standard error file descriptor */
   1.170 +
   1.171 +# ifndef	_POSIX_SOURCE
   1.172 +#  define	MAXNAMLEN	256	/* E32STD.H: KMaxName */	
   1.173 +# endif		/* _POSIX_SOURCE */
   1.174 +
   1.175 +# define	MAXPATHLEN	256	/* E32STD.H: KMaxFullName */
   1.176 +
   1.177 +#ifdef __cplusplus
   1.178 +}
   1.179 +#endif
   1.180 +#endif