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