Project

General

Profile

Statistics
| Branch: | Revision:

scoutos / prex-0.9.0 / usr / include / unistd.h @ 03e9c04a

History | View | Annotate | Download (5.5 KB)

1
/*-
2
 * Copyright (c) 1991, 1993, 1994
3
 *        The Regents of the University of California.  All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * 1. Redistributions of source code must retain the above copyright
9
 *    notice, this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright
11
 *    notice, this list of conditions and the following disclaimer in the
12
 *    documentation and/or other materials provided with the distribution.
13
 * 3. Neither the name of the University nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
 * SUCH DAMAGE.
28
 *
29
 *        @(#)unistd.h        8.12 (Berkeley) 4/27/95
30
 */
31

    
32
#ifndef _UNISTD_H_
33
#define        _UNISTD_H_
34

    
35
#include <sys/cdefs.h>
36
#include <sys/types.h>
37

    
38
#define         STDIN_FILENO        0        /* standard input file descriptor */
39
#define        STDOUT_FILENO        1        /* standard output file descriptor */
40
#define        STDERR_FILENO        2        /* standard error file descriptor */
41

    
42
#ifndef NULL
43
#define        NULL                0        /* null pointer constant */
44
#endif
45

    
46
__BEGIN_DECLS
47
int         access(const char *, int);
48
unsigned int         alarm(unsigned int);
49
int         chdir(const char *);
50
int         chown(const char *, uid_t, gid_t);
51
int         close(int);
52
size_t         confstr(int, char *, size_t);
53
int         dup(int);
54
int         dup2(int, int);
55
int         execl(const char *, const char *, ...);
56
int         execle(const char *, const char *, ...);
57
int         execlp(const char *, const char *, ...);
58
int         execv(const char *, char * const *);
59
int         execve(const char *, char * const *, char * const *);
60
int         execvp(const char *, char * const *);
61
void        _exit(int) __noreturn;
62
/* pid_t         fork(void); */
63
pid_t         vfork(void);
64
/* long         fpathconf(int, int); */
65
char        *getcwd(char *, size_t);
66
gid_t         getegid(void);
67
uid_t         geteuid(void);
68
gid_t         getgid(void);
69
/* int         getgroups(int, gid_t []); */
70
/* char        *getlogin(void); */
71
pid_t         getpgrp(void);
72
pid_t         getpid(void);
73
pid_t         getppid(void);
74
uid_t         getuid(void);
75
int         isatty(int);
76
int         link(const char *, const char *);
77
off_t         lseek(int, off_t, int);
78
/* long         pathconf(const char *, int); */
79
int         pause(void);
80
int         pipe(int *);
81
ssize_t         read(int, void *, size_t);
82
int         rmdir(const char *);
83
int         setgid(gid_t);
84
int         setpgid(pid_t, pid_t);
85
pid_t         setsid(void);
86
int         setuid(uid_t);
87
unsigned int         sleep(unsigned int);
88
/* long         sysconf(int); */
89
pid_t         tcgetpgrp(int);
90
int         tcsetpgrp(int, pid_t);
91
/* char        *ttyname(int); */
92
int         unlink(const char *);
93
ssize_t         write(int, const void *, size_t);
94

    
95
int         getopt(int, char * const [], const char *);
96

    
97
extern         char *optarg;                        /* getopt(3) external variables */
98
extern         int opterr;
99
extern         int optind;
100
extern         int optopt;
101

    
102
#ifndef        _POSIX_SOURCE
103
#ifdef        __STDC__
104
struct timeval;                                /* select(2) */
105
#endif
106
/* char        *brk(const char *); */
107
/* int         chroot(const char *); */
108
int         fchdir(int);
109
/* int         fchown(int, int, int); */
110
int         fsync(int);
111
int         ftruncate(int, off_t);
112
/* int         getdtablesize(void); */
113
/* long         gethostid(void); */
114
int         gethostname(char *, size_t);
115
/* mode_t         getmode(const void *, mode_t); */
116
int         getpagesize(void);
117
char        *getpass(const char *);
118
pid_t         getpgid(pid_t);
119
/* char        *getusershell(void); */
120
char        *getwd(char *);                        /* obsoleted by getcwd() */
121
/* int         initgroups(const char *, int); */
122
/* int         iruserok(unsigned long, int, const char *, const char *); */
123
int         mknod(const char *, mode_t, dev_t);
124
int         mkstemp(char *);
125
char        *mktemp(char *);
126
/* int         nfssvc(int, void *); */
127
int         nice(int);
128
void         psignal(unsigned int, const char *);
129
extern const char *const sys_siglist[];
130
/* int         readlink(const char *, char *, int); */
131
/* int         reboot(int); */
132
/* int         rresvport(int *); */
133
/* int         ruserok(const char *, int, const char *, const char *); */
134
/* char        *sbrk(int); */
135
/* int         select(int, fd_set *, fd_set *, fd_set *, struct timeval *); */
136
int         setegid(gid_t);
137
int         seteuid(uid_t);
138
/* int         setgroups(int, const gid_t *); */
139
/* void         sethostid(long); */
140
int         sethostname(const char *, size_t);
141
int         setpgrp(pid_t, pid_t);        /* obsoleted by setpgid() */
142
/* int         setregid(gid_t, gid_t); */
143
/* int         setreuid(uid_t, uid_t); */
144
/* int         setrgid(gid_t); */
145
/* int         setruid(uid_t); */
146
/* void         setusershell(void); */
147
/* int         symlink(const char *, const char *); */
148
void         sync(void);
149
int         truncate(const char *, off_t);
150
/* unsigned int         ualarm(unsigned int, unsigned int); */
151
void         usleep(unsigned int);
152
pid_t         getsid(pid_t);
153
void         strmode(mode_t, char *);
154

    
155
extern char *suboptarg;                        /* getsubopt(3) external variable */
156
int         getsubopt(char **, char * const *, char **);
157
#endif /* !_POSIX_SOURCE */
158

    
159
void         fslib_init(void);        /* used by Prex native task */
160
void         fslib_exit(void);        /* used by Prex native task */
161
__END_DECLS
162

    
163
/* configurable system strings */
164
#define        _CS_PATH                 1
165

    
166
#endif /* !_UNISTD_H_ */