13 extern char **environ;
15 void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
17 int _EXFUN(access,(const char *__path, int __amode ));
18 unsigned _EXFUN(alarm, (unsigned __secs ));
19 int _EXFUN(chdir, (const char *__path ));
20 int _EXFUN(chmod, (const char *__path, mode_t __mode ));
21 int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
22 int _EXFUN(close, (int __fildes ));
23 char _EXFUN(*ctermid, (char *__s ));
24 char _EXFUN(*cuserid, (char *__s ));
25 int _EXFUN(dup, (int __fildes ));
26 int _EXFUN(dup2, (int __fildes, int __fildes2 ));
27 int _EXFUN(execl, (const char *__path, const char *, ... ));
28 int _EXFUN(execle, (const char *__path, const char *, ... ));
29 int _EXFUN(execlp, (const char *__file, const char *, ... ));
30 int _EXFUN(execv, (const char *__path, char * const __argv[] ));
31 int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
32 int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
33 int _EXFUN(fchmod, (int __fildes, mode_t __mode ));
34 int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group ));
35 pid_t _EXFUN(fork, (void ));
36 long _EXFUN(fpathconf, (int __fd, int __name ));
37 int _EXFUN(fsync, (int __fd));
38 char _EXFUN(*getcwd, (char *__buf, size_t __size ));
39 gid_t _EXFUN(getegid, (void ));
40 uid_t _EXFUN(geteuid, (void ));
41 gid_t _EXFUN(getgid, (void ));
42 int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
43 char _EXFUN(*getlogin, (void ));
44 char _EXFUN(*getpass, (__const char *__prompt));
45 size_t _EXFUN(getpagesize, (void));
46 pid_t _EXFUN(getpgrp, (void ));
47 pid_t _EXFUN(getpid, (void ));
48 pid_t _EXFUN(getppid, (void ));
49 uid_t _EXFUN(getuid, (void ));
50 int _EXFUN(isatty, (int __fildes ));
51 int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group ));
52 int _EXFUN(link, (const char *__path1, const char *__path2 ));
53 int _EXFUN(nice, (int __nice_value ));
54 off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
55 long _EXFUN(pathconf, (const 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 ));
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 ));
86 #if defined(__CYGWIN32__) || defined(__rtems__)
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, (void));
93 int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
94 int _EXFUN(symlink, (const char *__name1, const char *__name2));
107 * RTEMS adheres to a later version of POSIX -- 1003.1b.
109 * XXX this version string should change.
113 #ifndef _POSIX_JOB_CONTROL
114 # define _POSIX_JOB_CONTROL 1
116 #ifndef _POSIX_SAVED_IDS
117 # define _POSIX_SAVED_IDS 1
119 # define _POSIX_VERSION 199009L
122 # define _POSIX_JOB_CONTROL 1
123 # define _POSIX_SAVED_IDS 1
124 # define _POSIX_VERSION 199009L
129 # define _POSIX_JOB_CONTROL 1
130 # define _POSIX_SAVED_IDS 0
131 # define _POSIX_VERSION 199009L
134 #define STDIN_FILENO 0 /* standard input file descriptor */
135 #define STDOUT_FILENO 1 /* standard output file descriptor */
136 #define STDERR_FILENO 2 /* standard error file descriptor */
138 long _EXFUN(sysconf, (int __name));
140 # define _SC_ARG_MAX 0
141 # define _SC_CHILD_MAX 1
142 # define _SC_CLK_TCK 2
143 # define _SC_NGROUPS_MAX 3
144 # define _SC_OPEN_MAX 4
145 /* no _SC_STREAM_MAX */
146 # define _SC_JOB_CONTROL 5
147 # define _SC_SAVED_IDS 6
148 # define _SC_VERSION 7
149 # define _SC_PAGESIZE 8
151 # define _PC_LINK_MAX 0
152 # define _PC_MAX_CANON 1
153 # define _PC_MAX_INPUT 2
154 # define _PC_NAME_MAX 3
155 # define _PC_PATH_MAX 4
156 # define _PC_PIPE_BUF 5
157 # define _PC_CHOWN_RESTRICTED 6
158 # define _PC_NO_TRUNC 7
159 # define _PC_VDISABLE 8
160 # define _PC_ASYNC_IO 9
161 # define _PC_PRIO_IO 10
162 # define _PC_SYNC_IO 11
164 # ifndef _POSIX_SOURCE
165 # define MAXNAMLEN 1024
166 # endif /* _POSIX_SOURCE */
168 /* FIXME: This is temporary until winsup gets sorted out. */
170 #define MAXPATHLEN (260 - 1 /* NUL */)
172 # define MAXPATHLEN 1024
178 #endif /* _SYS_UNISTD_H */