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