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