Update.
[glibc.git] / include / unistd.h
blobb8bc8bbf7272172a62d2c239d5d5bcb118f486c0
1 #ifndef _UNISTD_H
2 # include <posix/unistd.h>
4 /* Now define the internal interfaces. */
5 extern int __access (__const char *__name, int __type);
6 extern int __euidaccess (__const char *__name, int __type);
7 extern __off64_t __lseek64 (int __fd, __off64_t __offset, int __whence);
8 extern __off_t __lseek (int __fd, __off_t __offset, int __whence);
9 extern __off_t __libc_lseek (int __fd, __off_t __offset, int __whence);
10 extern __off64_t __libc_lseek64 (int __fd, __off64_t __offset, int __whence);
11 extern ssize_t __pread (int __fd, void *__buf, size_t __nbytes,
12 __off_t __offset);
13 extern ssize_t __libc_pread (int __fd, void *__buf, size_t __nbytes,
14 __off_t __offset);
15 extern ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes,
16 __off64_t __offset);
17 extern ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes,
18 __off64_t __offset);
19 extern ssize_t __pwrite (int __fd, __const void *__buf, size_t __n,
20 __off_t __offset);
21 extern ssize_t __libc_pwrite (int __fd, __const void *__buf, size_t __n,
22 __off_t __offset);
23 extern ssize_t __pwrite64 (int __fd, __const void *__buf, size_t __n,
24 __off64_t __offset);
25 extern ssize_t __libc_pwrite64 (int __fd, __const void *__buf, size_t __n,
26 __off64_t __offset);
27 extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
28 extern ssize_t __libc_write (int __fd, __const void *__buf, size_t __n);
29 extern int __pipe (int __pipedes[2]);
30 extern unsigned int __sleep (unsigned int __seconds);
31 extern int __chown (__const char *__file,
32 __uid_t __owner, __gid_t __group);
33 extern int __fchown (int __fd,
34 __uid_t __owner, __gid_t __group);
35 extern int __lchown (__const char *__file, __uid_t __owner,
36 __gid_t __group);
37 extern int __chdir (__const char *__path);
38 extern int __fchdir (int __fd);
39 extern char *__getcwd (char *__buf, size_t __size);
40 extern int __rmdir (const char *__path);
42 /* Get the canonical absolute name of the named directory, and put it in SIZE
43 bytes of BUF. Returns NULL if the directory couldn't be determined or
44 SIZE was too small. If successful, returns BUF. In GNU, if BUF is
45 NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
46 unless SIZE <= 0, in which case it is as big as necessary. */
48 char *__canonicalize_directory_name_internal (__const char *__thisdir,
49 char *__buf,
50 size_t __size);
52 extern int __dup (int __fd);
53 extern int __dup2 (int __fd, int __fd2);
54 extern int __execve (__const char *__path, char *__const __argv[],
55 char *__const __envp[]);
56 extern long int __pathconf (__const char *__path, int __name);
57 extern long int __fpathconf (int __fd, int __name);
58 extern long int __sysconf (int __name);
59 extern __pid_t __getpid (void);
60 extern __pid_t __getppid (void);
61 extern __pid_t __setsid (void);
62 extern __uid_t __getuid (void);
63 extern __uid_t __geteuid (void);
64 extern __gid_t __getgid (void);
65 extern __gid_t __getegid (void);
66 extern int __getgroups (int __size, __gid_t __list[]);
67 extern int __group_member (__gid_t __gid);
68 extern int __setuid (__uid_t __uid);
69 extern int __setreuid (__uid_t __ruid, __uid_t __euid);
70 extern int __setgid (__gid_t __gid);
71 extern int __setpgid (__pid_t __pid, __pid_t __pgid);
72 extern int __setregid (__gid_t __rgid, __gid_t __egid);
73 extern __pid_t __vfork (void);
74 extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
75 extern int __isatty (int __fd);
76 extern int __link (__const char *__from, __const char *__to);
77 extern int __symlink (__const char *__from, __const char *__to);
78 extern int __readlink (__const char *__path, char *__buf, size_t __len);
79 extern int __unlink (__const char *__name);
80 extern int __gethostname (char *__name, size_t __len);
81 extern int __profil (unsigned short int *__sample_buffer, size_t __size,
82 size_t __offset, unsigned int __scale);
83 extern int __getdtablesize (void);
84 extern int __brk (void *__addr);
85 extern int __close (int __fd);
86 extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
87 extern ssize_t __write (int __fd, __const void *__buf, size_t __n);
88 extern __pid_t __fork (void);
89 extern int __getpagesize (void) __attribute__ ((__const__));
90 extern int __ftruncate (int __fd, __off_t __length);
91 extern int __ftruncate64 (int __fd, __off64_t __length);
92 extern void *__sbrk (intptr_t __delta);
95 /* This variable is set nonzero at startup if the process's effective
96 IDs differ from its real IDs, or it is otherwise indicated that
97 extra security should be used. When this is set the dynamic linker
98 and some functions contained in the C library ignore various
99 environment variables that normally affect them. */
100 extern int __libc_enable_secure;
103 /* Various internal function. */
104 extern void __libc_check_standard_fds (void);
107 #endif