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