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