Back to index

glibc  2.9
Go to the documentation of this file.
00001 #ifndef _UNISTD_H
00002 # include <posix/unistd.h>
00004 libc_hidden_proto (_exit, __noreturn__)
00005 libc_hidden_proto (alarm)
00006 libc_hidden_proto (confstr)
00007 libc_hidden_proto (execl)
00008 libc_hidden_proto (execle)
00009 libc_hidden_proto (execlp)
00010 libc_hidden_proto (execvp)
00011 libc_hidden_proto (getpid)
00012 libc_hidden_proto (getsid)
00013 libc_hidden_proto (getdomainname)
00014 libc_hidden_proto (getlogin_r)
00015 libc_hidden_proto (seteuid)
00016 libc_hidden_proto (setegid)
00017 libc_hidden_proto (tcgetpgrp)
00018 libc_hidden_proto (readlinkat)
00020 /* Now define the internal interfaces.  */
00021 extern int __access (__const char *__name, int __type);
00022 extern int __euidaccess (__const char *__name, int __type);
00023 extern __off64_t __lseek64 (int __fd, __off64_t __offset, int __whence);
00024 extern __off_t __lseek (int __fd, __off_t __offset, int __whence);
00025 libc_hidden_proto (__lseek)
00026 extern __off_t __libc_lseek (int __fd, __off_t __offset, int __whence);
00027 extern __off64_t __libc_lseek64 (int __fd, __off64_t __offset, int __whence);
00028 extern ssize_t __pread (int __fd, void *__buf, size_t __nbytes,
00029                      __off_t __offset);
00030 extern ssize_t __libc_pread (int __fd, void *__buf, size_t __nbytes,
00031                           __off_t __offset);
00032 extern ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes,
00033                        __off64_t __offset);
00034 extern ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes,
00035                             __off64_t __offset);
00036 extern ssize_t __pwrite (int __fd, __const void *__buf, size_t __n,
00037                       __off_t __offset);
00038 extern ssize_t __libc_pwrite (int __fd, __const void *__buf, size_t __n,
00039                            __off_t __offset);
00040 extern ssize_t __pwrite64 (int __fd, __const void *__buf, size_t __n,
00041                         __off64_t __offset);
00042 libc_hidden_proto (__pwrite64)
00043 extern ssize_t __libc_pwrite64 (int __fd, __const void *__buf, size_t __n,
00044                             __off64_t __offset);
00045 extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
00046 libc_hidden_proto (__libc_read)
00047 extern ssize_t __libc_write (int __fd, __const void *__buf, size_t __n);
00048 libc_hidden_proto (__libc_write)
00049 extern int __pipe (int __pipedes[2]);
00050 libc_hidden_proto (__pipe)
00051 extern int __pipe2 (int __pipedes[2], int __flags);
00052 extern unsigned int __sleep (unsigned int __seconds);
00053 extern int __chown (__const char *__file,
00054                   __uid_t __owner, __gid_t __group);
00055 libc_hidden_proto (__chown)
00056 extern int __fchown (int __fd,
00057                    __uid_t __owner, __gid_t __group);
00058 extern int __lchown (__const char *__file, __uid_t __owner,
00059                    __gid_t __group);
00060 extern int __chdir (__const char *__path);
00061 extern int __fchdir (int __fd);
00062 extern char *__getcwd (char *__buf, size_t __size);
00063 extern int __rmdir (const char *__path);
00065 /* Get the canonical absolute name of the named directory, and put it in SIZE
00066    bytes of BUF.  Returns NULL if the directory couldn't be determined or
00067    SIZE was too small.  If successful, returns BUF.  In GNU, if BUF is
00068    NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
00069    unless SIZE <= 0, in which case it is as big as necessary.  */
00071 char *__canonicalize_directory_name_internal (__const char *__thisdir,
00072                                          char *__buf,
00073                                          size_t __size) attribute_hidden;
00075 extern int __dup (int __fd);
00076 extern int __dup2 (int __fd, int __fd2);
00077 libc_hidden_proto (__dup2)
00078 extern int __execve (__const char *__path, char *__const __argv[],
00079                    char *__const __envp[]);
00080 extern long int __pathconf (__const char *__path, int __name);
00081 extern long int __fpathconf (int __fd, int __name);
00082 extern long int __sysconf (int __name);
00083 libc_hidden_proto (__sysconf)
00084 extern __pid_t __getpid (void);
00085 libc_hidden_proto (__getpid)
00086 extern __pid_t __getppid (void);
00087 extern __pid_t __setsid (void);
00088 extern __uid_t __getuid (void);
00089 extern __uid_t __geteuid (void);
00090 extern __gid_t __getgid (void);
00091 extern __gid_t __getegid (void);
00092 extern int __getgroups (int __size, __gid_t __list[]);
00093 libc_hidden_proto (__getpgid)
00094 extern int __group_member (__gid_t __gid);
00095 extern int __setuid (__uid_t __uid);
00096 extern int __setreuid (__uid_t __ruid, __uid_t __euid);
00097 extern int __setgid (__gid_t __gid);
00098 extern int __setpgid (__pid_t __pid, __pid_t __pgid);
00099 libc_hidden_proto (__setpgid)
00100 extern int __setregid (__gid_t __rgid, __gid_t __egid);
00101 extern int __getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid);
00102 extern int __getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid);
00103 extern int __setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid);
00104 extern int __setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid);
00105 libc_hidden_proto (__getresuid)
00106 libc_hidden_proto (__getresgid)
00107 libc_hidden_proto (__setresuid)
00108 libc_hidden_proto (__setresgid)
00109 extern __pid_t __vfork (void);
00110 libc_hidden_proto (__vfork)
00111 extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
00112 extern int __isatty (int __fd);
00113 extern int __link (__const char *__from, __const char *__to);
00114 extern int __symlink (__const char *__from, __const char *__to);
00115 extern int __readlink (__const char *__path, char *__buf, size_t __len);
00116 extern int __unlink (__const char *__name);
00117 extern int __gethostname (char *__name, size_t __len);
00118 extern int __profil (unsigned short int *__sample_buffer, size_t __size,
00119                    size_t __offset, unsigned int __scale);
00120 extern int __getdtablesize (void);
00121 extern int __brk (void *__addr);
00122 extern int __close (int __fd);
00123 libc_hidden_proto (__close)
00124 extern int __libc_close (int __fd);
00125 extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
00126 libc_hidden_proto (__read)
00127 extern ssize_t __write (int __fd, __const void *__buf, size_t __n);
00128 libc_hidden_proto (__write)
00129 extern __pid_t __fork (void);
00130 libc_hidden_proto (__fork)
00131 extern int __getpagesize (void) __attribute__ ((__const__));
00132 libc_hidden_proto (__getpagesize)
00133 extern int __ftruncate (int __fd, __off_t __length);
00134 extern int __ftruncate64 (int __fd, __off64_t __length);
00135 extern int __truncate (const char *path, __off_t __length);
00136 extern void *__sbrk (intptr_t __delta);
00137 libc_hidden_proto (__sbrk)
00140 /* This variable is set nonzero at startup if the process's effective
00141    IDs differ from its real IDs, or it is otherwise indicated that
00142    extra security should be used.  When this is set the dynamic linker
00143    and some functions contained in the C library ignore various
00144    environment variables that normally affect them.  */
00145 extern int __libc_enable_secure attribute_relro;
00146 extern int __libc_enable_secure_decided;
00147 #ifdef IS_IN_rtld
00148 /* XXX The #ifdef should go.  */
00149 extern int __libc_enable_secure_internal attribute_relro attribute_hidden;
00150 #endif
00153 /* Various internal function.  */
00154 extern void __libc_check_standard_fds (void);
00157 /* Special exit function which only terminates the current thread.  */
00158 extern void __exit_thread (int val) __attribute__ ((noreturn));
00160 /* Internal name for fork function.  */
00161 extern __pid_t __libc_fork (void);
00163 /* Suspend the process until a signal arrives.
00164    This always returns -1 and sets `errno' to EINTR.  */
00165 extern int __libc_pause (void);
00166 /* Not cancelable variant.  */
00167 extern int __pause_nocancel (void) attribute_hidden;
00169 extern int __have_sock_cloexec;
00170 /* At lot of other functionality became available at the same time as
00171    SOCK_CLOEXEC.  Avoid defining separate variables for all of them
00172    unless it is really necessary.  */
00173 #define __have_pipe2 __have_sock_cloexec
00175 #endif