hppa: Implement fpu_control.h.
[glibc.git] / include / unistd.h
bloba5cbc5d2fc0107f67ecee1d32d9dc8f4cc69014f
1 #ifndef _UNISTD_H
2 # include <posix/unistd.h>
4 # ifndef _ISOMAC
5 __BEGIN_DECLS
7 libc_hidden_proto (_exit, __noreturn__)
8 libc_hidden_proto (alarm)
9 libc_hidden_proto (confstr)
10 libc_hidden_proto (execl)
11 libc_hidden_proto (execle)
12 libc_hidden_proto (execlp)
13 libc_hidden_proto (execvp)
14 libc_hidden_proto (getpid)
15 libc_hidden_proto (getsid)
16 libc_hidden_proto (getdomainname)
17 libc_hidden_proto (getlogin_r)
18 libc_hidden_proto (seteuid)
19 libc_hidden_proto (setegid)
20 libc_hidden_proto (tcgetpgrp)
21 libc_hidden_proto (readlinkat)
23 /* Now define the internal interfaces. */
24 extern int __access (const char *__name, int __type);
25 extern int __euidaccess (const char *__name, int __type);
26 extern __off64_t __lseek64 (int __fd, __off64_t __offset, int __whence);
27 extern __off_t __lseek (int __fd, __off_t __offset, int __whence);
28 libc_hidden_proto (__lseek)
29 extern __off_t __libc_lseek (int __fd, __off_t __offset, int __whence);
30 extern __off64_t __libc_lseek64 (int __fd, __off64_t __offset, int __whence);
31 extern ssize_t __pread (int __fd, void *__buf, size_t __nbytes,
32 __off_t __offset);
33 extern ssize_t __libc_pread (int __fd, void *__buf, size_t __nbytes,
34 __off_t __offset);
35 extern ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes,
36 __off64_t __offset);
37 extern ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes,
38 __off64_t __offset);
39 extern ssize_t __pwrite (int __fd, const void *__buf, size_t __n,
40 __off_t __offset);
41 extern ssize_t __libc_pwrite (int __fd, const void *__buf, size_t __n,
42 __off_t __offset);
43 extern ssize_t __pwrite64 (int __fd, const void *__buf, size_t __n,
44 __off64_t __offset);
45 libc_hidden_proto (__pwrite64)
46 extern ssize_t __libc_pwrite64 (int __fd, const void *__buf, size_t __n,
47 __off64_t __offset) attribute_hidden;
48 extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
49 libc_hidden_proto (__libc_read)
50 extern ssize_t __libc_write (int __fd, const void *__buf, size_t __n);
51 libc_hidden_proto (__libc_write)
52 extern int __pipe (int __pipedes[2]);
53 libc_hidden_proto (__pipe)
54 extern int __pipe2 (int __pipedes[2], int __flags);
55 extern unsigned int __sleep (unsigned int __seconds);
56 extern int __chown (const char *__file,
57 __uid_t __owner, __gid_t __group);
58 libc_hidden_proto (__chown)
59 extern int __fchown (int __fd,
60 __uid_t __owner, __gid_t __group);
61 extern int __lchown (const char *__file, __uid_t __owner,
62 __gid_t __group);
63 extern int __chdir (const char *__path);
64 extern int __fchdir (int __fd);
65 extern char *__getcwd (char *__buf, size_t __size);
66 extern int __rmdir (const char *__path);
67 extern int __execvpe (const char *file, char *const argv[],
68 char *const envp[]);
70 /* Get the canonical absolute name of the named directory, and put it in SIZE
71 bytes of BUF. Returns NULL if the directory couldn't be determined or
72 SIZE was too small. If successful, returns BUF. In GNU, if BUF is
73 NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
74 unless SIZE <= 0, in which case it is as big as necessary. */
76 char *__canonicalize_directory_name_internal (const char *__thisdir,
77 char *__buf,
78 size_t __size) attribute_hidden;
80 extern int __dup (int __fd);
81 extern int __dup2 (int __fd, int __fd2);
82 libc_hidden_proto (__dup2)
83 extern int __dup3 (int __fd, int __fd2, int flags);
84 libc_hidden_proto (__dup3)
85 extern int __execve (const char *__path, char *const __argv[],
86 char *const __envp[]);
87 extern long int __pathconf (const char *__path, int __name);
88 extern long int __fpathconf (int __fd, int __name);
89 extern long int __sysconf (int __name);
90 libc_hidden_proto (__sysconf)
91 extern __pid_t __getpid (void);
92 libc_hidden_proto (__getpid)
93 extern __pid_t __getppid (void);
94 extern __pid_t __setsid (void);
95 extern __uid_t __getuid (void);
96 extern __uid_t __geteuid (void);
97 extern __gid_t __getgid (void);
98 extern __gid_t __getegid (void);
99 extern int __getgroups (int __size, __gid_t __list[]);
100 libc_hidden_proto (__getpgid)
101 extern int __group_member (__gid_t __gid);
102 extern int __setuid (__uid_t __uid);
103 extern int __setreuid (__uid_t __ruid, __uid_t __euid);
104 extern int __setgid (__gid_t __gid);
105 extern int __setpgid (__pid_t __pid, __pid_t __pgid);
106 libc_hidden_proto (__setpgid)
107 extern int __setregid (__gid_t __rgid, __gid_t __egid);
108 extern int __getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid);
109 extern int __getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid);
110 extern int __setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
111 extern int __setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid);
112 libc_hidden_proto (__getresuid)
113 libc_hidden_proto (__getresgid)
114 libc_hidden_proto (__setresuid)
115 libc_hidden_proto (__setresgid)
116 extern __pid_t __vfork (void);
117 libc_hidden_proto (__vfork)
118 extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
119 extern int __isatty (int __fd);
120 extern int __link (const char *__from, const char *__to);
121 extern int __symlink (const char *__from, const char *__to);
122 extern ssize_t __readlink (const char *__path, char *__buf, size_t __len);
123 extern int __unlink (const char *__name);
124 extern int __gethostname (char *__name, size_t __len);
125 extern int __profil (unsigned short int *__sample_buffer, size_t __size,
126 size_t __offset, unsigned int __scale);
127 extern int __getdtablesize (void);
128 extern int __brk (void *__addr);
129 extern int __close (int __fd);
130 libc_hidden_proto (__close)
131 extern int __libc_close (int __fd);
132 extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
133 libc_hidden_proto (__read)
134 extern ssize_t __write (int __fd, const void *__buf, size_t __n);
135 libc_hidden_proto (__write)
136 extern __pid_t __fork (void);
137 libc_hidden_proto (__fork)
138 extern int __getpagesize (void) __attribute__ ((__const__));
139 libc_hidden_proto (__getpagesize)
140 extern int __ftruncate (int __fd, __off_t __length);
141 extern int __ftruncate64 (int __fd, __off64_t __length);
142 extern int __truncate (const char *path, __off_t __length);
143 extern void *__sbrk (intptr_t __delta);
144 libc_hidden_proto (__sbrk)
147 /* This variable is set nonzero at startup if the process's effective
148 IDs differ from its real IDs, or it is otherwise indicated that
149 extra security should be used. When this is set the dynamic linker
150 and some functions contained in the C library ignore various
151 environment variables that normally affect them. */
152 extern int __libc_enable_secure attribute_relro;
153 extern int __libc_enable_secure_decided;
154 #ifdef IS_IN_rtld
155 /* XXX The #ifdef should go. */
156 extern int __libc_enable_secure_internal attribute_relro attribute_hidden;
157 #endif
160 /* Various internal function. */
161 extern void __libc_check_standard_fds (void);
164 /* Special exit function which only terminates the current thread. */
165 extern void __exit_thread (int val) __attribute__ ((noreturn));
167 /* Internal name for fork function. */
168 extern __pid_t __libc_fork (void);
170 /* Suspend the process until a signal arrives.
171 This always returns -1 and sets `errno' to EINTR. */
172 extern int __libc_pause (void);
173 /* Not cancelable variant. */
174 extern int __pause_nocancel (void) attribute_hidden;
176 extern int __have_sock_cloexec attribute_hidden;
177 extern int __have_pipe2 attribute_hidden;
178 extern int __have_dup3 attribute_hidden;
180 extern int __getlogin_r_loginuid (char *name, size_t namesize)
181 attribute_hidden;
183 __END_DECLS
184 # endif
186 #endif