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