OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [newlib/] [newlib/] [libc/] [include/] [sys/] [unistd.h] - Blame information for rev 39

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
#ifndef _SYS_UNISTD_H
2
#define _SYS_UNISTD_H
3
 
4
#ifdef __cplusplus
5
extern "C" {
6
#endif
7
 
8
#include <_ansi.h>
9
#include <sys/types.h>
10
#define __need_size_t
11
#include <stddef.h>
12
 
13
extern char **environ;
14
 
15
/* Cygwin32 _exit does return, others do not */
16
#ifdef __CYGWIN32__
17
void    _EXFUN(_exit, (int _status ));
18
#else
19
void    _EXFUN(_exit, (int _status ) _ATTRIBUTE ((noreturn)));
20
#endif
21
 
22
int     _EXFUN(access,(const char *_path, int _amode ));
23
unsigned  _EXFUN(alarm, (unsigned _secs ));
24
int     _EXFUN(chdir, (const char *_path ));
25
int     _EXFUN(chmod, (const char *_path, mode_t _mode ));
26
int     _EXFUN(chown, (const char *_path, uid_t _owner, gid_t _group ));
27
int     _EXFUN(close, (int _fildes ));
28
char    _EXFUN(*ctermid, (char *_s ));
29
char    _EXFUN(*cuserid, (char *_s ));
30
int     _EXFUN(dup, (int _fildes ));
31
int     _EXFUN(dup2, (int _fildes, int _fildes2 ));
32
int     _EXFUN(execl, (const char *_path, const char *, ... ));
33
int     _EXFUN(execle, (const char *_path, const char *, ... ));
34
int     _EXFUN(execlp, (const char *_file, const char *, ... ));
35
int     _EXFUN(execv, (const char *_path, char * const _argv[] ));
36
int     _EXFUN(execve, (const char *_path, char * const _argv[], char * const _envp[] ));
37
int     _EXFUN(execvp, (const char *_file, char * const _argv[] ));
38
pid_t   _EXFUN(fork, (void ));
39
long    _EXFUN(fpathconf, (int _fd, int _name ));
40
int     _EXFUN(fsync, (int _fd));
41
char    _EXFUN(*getcwd, (char *_buf, size_t _size ));
42
gid_t   _EXFUN(getegid, (void ));
43
uid_t   _EXFUN(geteuid, (void ));
44
gid_t   _EXFUN(getgid, (void ));
45
int     _EXFUN(getgroups, (int _gidsetsize, gid_t _grouplist[] ));
46
char    _EXFUN(*getlogin, (void ));
47
size_t  _EXFUN(getpagesize, (void));
48
pid_t   _EXFUN(getpgrp, (void ));
49
pid_t   _EXFUN(getpid, (void ));
50
pid_t   _EXFUN(getppid, (void ));
51
uid_t   _EXFUN(getuid, (void ));
52
int     _EXFUN(isatty, (int _fildes ));
53
int     _EXFUN(link, (const char *_path1, const char *_path2 ));
54
off_t   _EXFUN(lseek, (int _fildes, off_t _offset, int _whence ));
55
long    _EXFUN(pathconf, (char *_path, int _name ));
56
int     _EXFUN(pause, (void ));
57
int     _EXFUN(pipe, (int _fildes[2] ));
58
int     _EXFUN(read, (int _fildes, void *_buf, size_t _nbyte ));
59
int     _EXFUN(rmdir, (const char *_path ));
60
void *  _EXFUN(sbrk,  (size_t incr));
61
int     _EXFUN(setgid, (gid_t _gid ));
62
int     _EXFUN(setpgid, (pid_t _pid, pid_t _pgid ));
63
pid_t   _EXFUN(setsid, (void ));
64
int     _EXFUN(setuid, (uid_t _uid ));
65
unsigned _EXFUN(sleep, (unsigned int _seconds ));
66
void    _EXFUN(swab, (const void *, void *, ssize_t));
67
long    _EXFUN(sysconf, (int _name ));
68
pid_t   _EXFUN(tcgetpgrp, (int _fildes ));
69
int     _EXFUN(tcsetpgrp, (int _fildes, pid_t _pgrp_id ));
70
char    _EXFUN(*ttyname, (int _fildes ));
71
int     _EXFUN(unlink, (const char *_path ));
72
int     _EXFUN(write, (int _fildes, const void *_buf, size_t _nbyte ));
73
 
74
/* Provide prototypes for most of the _<systemcall> names that are
75
   provided in newlib for some compilers.  */
76
int     _EXFUN(_close, (int _fildes ));
77
pid_t   _EXFUN(_fork, (void ));
78
pid_t   _EXFUN(_getpid, (void ));
79
int     _EXFUN(_link, (const char *_path1, const char *_path2 ));
80
off_t   _EXFUN(_lseek, (int _fildes, off_t _offset, int _whence ));
81
int     _EXFUN(_read, (int _fildes, void *_buf, size_t _nbyte ));
82
void *  _EXFUN(_sbrk,  (size_t incr));
83
int     _EXFUN(_unlink, (const char *_path ));
84
int     _EXFUN(_write, (int _fildes, const void *_buf, size_t _nbyte ));
85
 
86
#ifdef __CYGWIN32__
87
unsigned _EXFUN(usleep, (unsigned int _useconds ));
88
int     _EXFUN(ftruncate, (int fd, off_t length));
89
int     _EXFUN(truncate, (const char *, off_t length));
90
int     _EXFUN(gethostname, (char *name, size_t len));
91
char *  _EXFUN(mktemp, (char *));
92
int     _EXFUN(sync, (char *));
93
#endif
94
 
95
# define        F_OK    0
96
# define        R_OK    4
97
# define        W_OK    2
98
# define        X_OK    1
99
 
100
# define        SEEK_SET        0
101
# define        SEEK_CUR        1
102
# define        SEEK_END        2
103
 
104
#ifdef __svr4__
105
# define _POSIX_JOB_CONTROL     1
106
# define _POSIX_SAVED_IDS       1
107
# define _POSIX_VERSION 199009L
108
#endif
109
 
110
#ifdef __CYGWIN32__
111
# define _POSIX_JOB_CONTROL     1
112
# define _POSIX_SAVED_IDS       0
113
# define _POSIX_VERSION         199009L
114
#endif
115
 
116
#define STDIN_FILENO    0       /* standard input file descriptor */
117
#define STDOUT_FILENO   1       /* standard output file descriptor */
118
#define STDERR_FILENO   2       /* standard error file descriptor */
119
 
120
long _EXFUN(sysconf, (int _name));
121
 
122
# define        _SC_ARG_MAX     0
123
# define        _SC_CHILD_MAX   1
124
# define        _SC_CLK_TCK     2
125
# define        _SC_NGROUPS_MAX 3
126
# define        _SC_OPEN_MAX    4
127
/* no _SC_STREAM_MAX */
128
# define        _SC_JOB_CONTROL 5
129
# define        _SC_SAVED_IDS   6
130
# define        _SC_VERSION     7
131
# define        _SC_PAGESIZE    8
132
 
133
# define        _PC_LINK_MAX    0
134
# define        _PC_MAX_CANON   1
135
# define        _PC_MAX_INPUT   2
136
# define        _PC_NAME_MAX    3
137
# define        _PC_PATH_MAX    4
138
# define        _PC_PIPE_BUF    5
139
# define        _PC_CHOWN_RESTRICTED    6
140
# define        _PC_NO_TRUNC    7
141
# define        _PC_VDISABLE    8
142
 
143
# ifndef        _POSIX_SOURCE
144
#  define       MAXNAMLEN       1024
145
# endif         /* _POSIX_SOURCE */
146
 
147
/* FIXME: This is temporary until winsup gets sorted out.  */
148
#ifdef __CYGWIN32__
149
#define MAXPATHLEN (260 - 1 /* NUL */)
150
#else
151
# define        MAXPATHLEN      1024
152
#endif
153
 
154
#ifdef __cplusplus
155
}
156
#endif
157
#endif /* _SYS_UNISTD_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.