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