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