os/ossrv/genericopenlibs/cstdlib/LINCSYS/UNISTD.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
/**
sl@0
    21
 @file
sl@0
    22
 @PublishedAll
sl@0
    23
*/
sl@0
    24
sl@0
    25
#ifndef _SYS_UNISTD_H
sl@0
    26
#define _SYS_UNISTD_H
sl@0
    27
#ifdef __cplusplus
sl@0
    28
extern "C" {
sl@0
    29
#endif
sl@0
    30
#include <_ansi.h>
sl@0
    31
#include <sys/types.h>
sl@0
    32
#define __need_size_t
sl@0
    33
#include <stddef.h>
sl@0
    34
sl@0
    35
IMPORT_C int	access		(const char *_path, int _amode );
sl@0
    36
IMPORT_C int	waccess		(const wchar_t *_path, int _amode );
sl@0
    37
IMPORT_C int    chdir		(const char *_path );
sl@0
    38
IMPORT_C int    wchdir		(const wchar_t *_path );
sl@0
    39
IMPORT_C int    chmod		(const char *_path, mode_t _mode );
sl@0
    40
IMPORT_C int    wchmod		(const wchar_t *_path, mode_t _mode );
sl@0
    41
IMPORT_C int    close		(int _fildes );
sl@0
    42
IMPORT_C int    dup		(int _fildes );
sl@0
    43
IMPORT_C int    dup2		(int _fildes, int _fildes2 );
sl@0
    44
IMPORT_C int    fsync		(int _fildes );
sl@0
    45
IMPORT_C char*	getcwd		(char *_buf, size_t _size );
sl@0
    46
IMPORT_C wchar_t*	wgetcwd		(wchar_t *_buf, size_t _size );
sl@0
    47
IMPORT_C int	gethostname	(char *_buf, size_t _size );
sl@0
    48
IMPORT_C int    isatty		(int _fildes );
sl@0
    49
IMPORT_C off_t  lseek		(int _fildes, off_t _offset, int _whence );
sl@0
    50
IMPORT_C int	open		(const char *, int, ...);
sl@0
    51
IMPORT_C int	wopen		(const wchar_t *, int, ...);
sl@0
    52
IMPORT_C int    read		(int _fildes, char *_buf, size_t _nbyte );
sl@0
    53
IMPORT_C int	rename		(const char *, const char *);
sl@0
    54
IMPORT_C int	wrename		(const wchar_t *, const wchar_t *);
sl@0
    55
IMPORT_C int    rmdir		(const char *_path );
sl@0
    56
IMPORT_C int    wrmdir		(const wchar_t *_path );
sl@0
    57
IMPORT_C int    unlink		(const char *_path );
sl@0
    58
IMPORT_C int    wunlink		(const wchar_t *_path );
sl@0
    59
IMPORT_C int    write		(int _fildes, const char *_buf, size_t _nbyte );
sl@0
    60
IMPORT_C void	_exit		(int _status ) _ATTRIBUTE((noreturn));
sl@0
    61
sl@0
    62
/** 
sl@0
    63
NB. open is also declared in fcntl.h 
sl@0
    64
@publishedAll
sl@0
    65
@released
sl@0
    66
*/
sl@0
    67
IMPORT_C pid_t   getpid		(void );
sl@0
    68
/**
sl@0
    69
@publishedAll
sl@0
    70
@released
sl@0
    71
*/
sl@0
    72
IMPORT_C unsigned sleep		(unsigned int _seconds );
sl@0
    73
sl@0
    74
#define remove(x)       unlink(x)
sl@0
    75
#define wremove(x)       wunlink(x)
sl@0
    76
sl@0
    77
unsigned  alarm		(unsigned _secs );
sl@0
    78
int     chown		(const char *_path, uid_t _owner, gid_t _group );
sl@0
    79
char    *ctermid	(char *_s );
sl@0
    80
char    *cuserid	(char *_s );
sl@0
    81
int     execl		(const char *_path, const char *, ... );
sl@0
    82
int     execle		(const char *_path, const char *, ... );
sl@0
    83
int     execlp		(const char *_file, const char *, ... );
sl@0
    84
int     execv		(const char *_path, char * const _argv[] );
sl@0
    85
int     execve		(const char *_path, char * const _argv[], char * const _envp[] );
sl@0
    86
int     execvp		(const char *_file, char * const _argv[] );
sl@0
    87
pid_t   fork		(void );
sl@0
    88
long    fpathconf	(int _fd, int _name );
sl@0
    89
gid_t   getegid		(void );
sl@0
    90
uid_t   geteuid		(void );
sl@0
    91
gid_t   getgid		(void );
sl@0
    92
int     getgroups	(int _gidsetsize, gid_t _grouplist[] );
sl@0
    93
char    *getlogin	(void );
sl@0
    94
size_t  getpagesize	(void);
sl@0
    95
pid_t   getpgrp		(void );
sl@0
    96
pid_t   getppid		(void );
sl@0
    97
uid_t   getuid		(void );
sl@0
    98
int     link		(const char *_path1, const char *_path2 );
sl@0
    99
long    pathconf	(char *_path, int _name );
sl@0
   100
int     pause		(void );
sl@0
   101
int     pipe		(int _fildes[2] );
sl@0
   102
void *  sbrk		(size_t incr);
sl@0
   103
int     setgid		(gid_t _gid );
sl@0
   104
int     setpgid		(pid_t _pid, pid_t _pgid );
sl@0
   105
pid_t   setsid		(void );
sl@0
   106
int     setuid		(uid_t _uid );
sl@0
   107
long    sysconf		(int _name );
sl@0
   108
pid_t   tcgetpgrp	(int _fildes );
sl@0
   109
int     tcsetpgrp	(int _fildes, pid_t _pgrp_id );
sl@0
   110
char    *ttyname	(int _fildes );
sl@0
   111
sl@0
   112
long	sysconf		(int _name);
sl@0
   113
sl@0
   114
# define	_SC_ARG_MAX	0
sl@0
   115
# define	_SC_CHILD_MAX	1
sl@0
   116
# define	_SC_CLK_TCK	2
sl@0
   117
# define	_SC_NGROUPS_MAX	3
sl@0
   118
# define	_SC_OPEN_MAX	4
sl@0
   119
/* no _SC_STREAM_MAX */
sl@0
   120
# define	_SC_JOB_CONTROL	5
sl@0
   121
# define	_SC_SAVED_IDS	6
sl@0
   122
# define	_SC_VERSION	7
sl@0
   123
# define        _SC_PAGESIZE    8
sl@0
   124
# define	_PC_LINK_MAX	0
sl@0
   125
# define	_PC_MAX_CANON	1
sl@0
   126
# define	_PC_MAX_INPUT	2
sl@0
   127
# define	_PC_NAME_MAX	3
sl@0
   128
# define	_PC_PATH_MAX	4
sl@0
   129
# define	_PC_PIPE_BUF	5
sl@0
   130
# define	_PC_CHOWN_RESTRICTED	6
sl@0
   131
# define	_PC_NO_TRUNC	7
sl@0
   132
# define	_PC_VDISABLE	8
sl@0
   133
sl@0
   134
# define	F_OK	0
sl@0
   135
# define	R_OK	4
sl@0
   136
# define	W_OK	2
sl@0
   137
# define	X_OK	1
sl@0
   138
sl@0
   139
# define	SEEK_SET	0
sl@0
   140
# define	SEEK_CUR	1
sl@0
   141
# define	SEEK_END	2
sl@0
   142
sl@0
   143
#ifdef __svr4__
sl@0
   144
# define _POSIX_JOB_CONTROL	1
sl@0
   145
# define _POSIX_SAVED_IDS	1
sl@0
   146
# define _POSIX_VERSION	199009L
sl@0
   147
#endif
sl@0
   148
/**
sl@0
   149
@publishedAll
sl@0
   150
@released
sl@0
   151
*/
sl@0
   152
#define STDIN_FILENO    0       /* standard input file descriptor */
sl@0
   153
/**
sl@0
   154
@publishedAll
sl@0
   155
@released
sl@0
   156
*/
sl@0
   157
#define STDOUT_FILENO   1       /* standard output file descriptor */
sl@0
   158
/**
sl@0
   159
@publishedAll
sl@0
   160
@released
sl@0
   161
*/
sl@0
   162
#define STDERR_FILENO   2       /* standard error file descriptor */
sl@0
   163
sl@0
   164
# ifndef	_POSIX_SOURCE
sl@0
   165
#  define	MAXNAMLEN	256	/* E32STD.H: KMaxName */	
sl@0
   166
# endif		/* _POSIX_SOURCE */
sl@0
   167
sl@0
   168
# define	MAXPATHLEN	256	/* E32STD.H: KMaxFullName */
sl@0
   169
sl@0
   170
#ifdef __cplusplus
sl@0
   171
}
sl@0
   172
#endif
sl@0
   173
#endif