]> sourceware.org Git - glibc.git/blame - include/unistd.h
[BZ #2329]
[glibc.git] / include / unistd.h
CommitLineData
f001ded0
UD
1#ifndef _UNISTD_H
2# include <posix/unistd.h>
bdbf022d 3
81cb0d82 4libc_hidden_proto (_exit, __noreturn__)
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);
a4baf360 24libc_hidden_proto (__lseek)
f16d4019 25extern __off_t __libc_lseek (int __fd, __off_t __offset, int __whence);
778c59c8 26extern __off64_t __libc_lseek64 (int __fd, __off64_t __offset, int __whence);
aaa8d85c
UD
27extern ssize_t __pread (int __fd, void *__buf, size_t __nbytes,
28 __off_t __offset);
778c59c8
UD
29extern ssize_t __libc_pread (int __fd, void *__buf, size_t __nbytes,
30 __off_t __offset);
6991feeb
AJ
31extern ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes,
32 __off64_t __offset);
778c59c8
UD
33extern ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes,
34 __off64_t __offset);
aaa8d85c
UD
35extern ssize_t __pwrite (int __fd, __const void *__buf, size_t __n,
36 __off_t __offset);
778c59c8
UD
37extern ssize_t __libc_pwrite (int __fd, __const void *__buf, size_t __n,
38 __off_t __offset);
6991feeb
AJ
39extern ssize_t __pwrite64 (int __fd, __const void *__buf, size_t __n,
40 __off64_t __offset);
37ba7d66 41libc_hidden_proto (__pwrite64)
778c59c8
UD
42extern ssize_t __libc_pwrite64 (int __fd, __const void *__buf, size_t __n,
43 __off64_t __offset);
e9e9b245 44extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
37ba7d66 45libc_hidden_proto (__libc_read)
e9e9b245 46extern ssize_t __libc_write (int __fd, __const void *__buf, size_t __n);
37ba7d66 47libc_hidden_proto (__libc_write)
aaa8d85c 48extern int __pipe (int __pipedes[2]);
37ba7d66 49libc_hidden_proto (__pipe)
aaa8d85c
UD
50extern unsigned int __sleep (unsigned int __seconds);
51extern int __chown (__const char *__file,
52 __uid_t __owner, __gid_t __group);
37ba7d66 53libc_hidden_proto (__chown)
aaa8d85c
UD
54extern int __fchown (int __fd,
55 __uid_t __owner, __gid_t __group);
56extern int __lchown (__const char *__file, __uid_t __owner,
57 __gid_t __group);
58extern int __chdir (__const char *__path);
59extern int __fchdir (int __fd);
60extern char *__getcwd (char *__buf, size_t __size);
108c6efa 61extern int __rmdir (const char *__path);
bdbf022d
UD
62
63/* Get the canonical absolute name of the named directory, and put it in SIZE
64 bytes of BUF. Returns NULL if the directory couldn't be determined or
65 SIZE was too small. If successful, returns BUF. In GNU, if BUF is
66 NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
67 unless SIZE <= 0, in which case it is as big as necessary. */
68
aaa8d85c
UD
69char *__canonicalize_directory_name_internal (__const char *__thisdir,
70 char *__buf,
f83af095 71 size_t __size) attribute_hidden;
bdbf022d 72
aaa8d85c
UD
73extern int __dup (int __fd);
74extern int __dup2 (int __fd, int __fd2);
37ba7d66 75libc_hidden_proto (__dup2)
aaa8d85c
UD
76extern int __execve (__const char *__path, char *__const __argv[],
77 char *__const __envp[]);
78extern long int __pathconf (__const char *__path, int __name);
79extern long int __fpathconf (int __fd, int __name);
80extern long int __sysconf (int __name);
a20d8dbe 81libc_hidden_proto (__sysconf)
6991feeb 82extern __pid_t __getpid (void);
37ba7d66 83libc_hidden_proto (__getpid)
aaa8d85c
UD
84extern __pid_t __getppid (void);
85extern __pid_t __setsid (void);
86extern __uid_t __getuid (void);
87extern __uid_t __geteuid (void);
88extern __gid_t __getgid (void);
89extern __gid_t __getegid (void);
90extern int __getgroups (int __size, __gid_t __list[]);
37ba7d66 91libc_hidden_proto (__getpgid)
aaa8d85c
UD
92extern int __group_member (__gid_t __gid);
93extern int __setuid (__uid_t __uid);
94extern int __setreuid (__uid_t __ruid, __uid_t __euid);
95extern int __setgid (__gid_t __gid);
6991feeb 96extern int __setpgid (__pid_t __pid, __pid_t __pgid);
37ba7d66 97libc_hidden_proto (__setpgid)
aaa8d85c 98extern int __setregid (__gid_t __rgid, __gid_t __egid);
0d5cb2c7
RM
99extern int __getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid);
100extern int __getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid);
101extern int __setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
102extern int __setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid);
747bf98e
RM
103libc_hidden_proto (__getresuid)
104libc_hidden_proto (__getresgid)
105libc_hidden_proto (__setresuid)
106libc_hidden_proto (__setresgid)
aaa8d85c 107extern __pid_t __vfork (void);
d1436edc 108libc_hidden_proto (__vfork)
aaa8d85c
UD
109extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
110extern int __isatty (int __fd);
111extern int __link (__const char *__from, __const char *__to);
112extern int __symlink (__const char *__from, __const char *__to);
113extern int __readlink (__const char *__path, char *__buf, size_t __len);
114extern int __unlink (__const char *__name);
cf4431ed 115extern int __gethostname (char *__name, size_t __len);
aaa8d85c
UD
116extern int __profil (unsigned short int *__sample_buffer, size_t __size,
117 size_t __offset, unsigned int __scale);
118extern int __getdtablesize (void);
119extern int __brk (void *__addr);
6991feeb 120extern int __close (int __fd);
37ba7d66 121libc_hidden_proto (__close)
3335502b 122extern int __libc_close (int __fd);
6991feeb 123extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
37ba7d66 124libc_hidden_proto (__read)
6991feeb 125extern ssize_t __write (int __fd, __const void *__buf, size_t __n);
37ba7d66 126libc_hidden_proto (__write)
6991feeb 127extern __pid_t __fork (void);
d1436edc 128libc_hidden_proto (__fork)
6991feeb 129extern int __getpagesize (void) __attribute__ ((__const__));
37ba7d66 130libc_hidden_proto (__getpagesize)
6991feeb 131extern int __ftruncate (int __fd, __off_t __length);
2958e6cc 132extern int __ftruncate64 (int __fd, __off64_t __length);
f5164429 133extern int __truncate (const char *path, __off_t __length);
6991feeb 134extern void *__sbrk (intptr_t __delta);
37ba7d66 135libc_hidden_proto (__sbrk)
06535ae9
UD
136
137
138/* This variable is set nonzero at startup if the process's effective
139 IDs differ from its real IDs, or it is otherwise indicated that
140 extra security should be used. When this is set the dynamic linker
141 and some functions contained in the C library ignore various
142 environment variables that normally affect them. */
d0369217 143extern int __libc_enable_secure attribute_relro;
be4d8038 144extern int __libc_enable_secure_decided;
403e0597 145#ifdef IS_IN_rtld
e6caf4e1 146/* XXX The #ifdef should go. */
d0369217 147extern int __libc_enable_secure_internal attribute_relro attribute_hidden;
e6caf4e1 148#endif
06535ae9 149
17427edd
UD
150
151/* Various internal function. */
152extern void __libc_check_standard_fds (void);
153
7ae4abe9
UD
154
155/* Special exit function which only terminates the current thread. */
156extern void __exit_thread (int val) __attribute__ ((noreturn));
157
2ef30b3d
UD
158/* Internal name for fork function. */
159extern __pid_t __libc_fork (void);
160
65c93f62
UD
161/* Suspend the process until a signal arrives.
162 This always returns -1 and sets `errno' to EINTR. */
163extern int __libc_pause (void);
164
f001ded0 165#endif
This page took 0.224341 seconds and 5 git commands to generate.