#ifndef _UNISTD_H
#define _UNISTD_H 1
#include
__BEGIN_DECLS
#define _POSIX_VERSION 200112L
#define _POSIX2_VERSION 200112L
#define _POSIX2_C_BIND 200112L
#define _POSIX2_C_DEV 200112L
#define _POSIX2_SW_DEV 200112L
#define _POSIX2_LOCALEDEF 200112L
#ifdef __USE_UNIX98
# define _XOPEN_VERSION 500
#else
# define _XOPEN_VERSION 4
#endif
#define _XOPEN_XCU_VERSION 4
#define _XOPEN_XPG2 1
#define _XOPEN_XPG3 1
#define _XOPEN_XPG4 1
#define _XOPEN_UNIX 1
#define _XOPEN_CRYPT 1
#define _XOPEN_ENH_I18N 1
#define _XOPEN_LEGACY 1
#include
#ifdef __USE_UNIX98
# include
#endif
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#include
#ifndef __ssize_t_defined
typedef __ssize_t ssize_t;
# define __ssize_t_defined
#endif
#define __need_size_t
#define __need_NULL
#include
#if defined __USE_XOPEN || defined __USE_XOPEN2K
# ifndef __gid_t_defined
typedef __gid_t gid_t;
# define __gid_t_defined
# endif
# ifndef __uid_t_defined
typedef __uid_t uid_t;
# define __uid_t_defined
# endif
# ifndef __off_t_defined
# ifndef __USE_FILE_OFFSET64
typedef __off_t off_t;
# else
typedef __off64_t off_t;
# endif
# define __off_t_defined
# endif
# if defined __USE_LARGEFILE64 && !defined __off64_t_defined
typedef __off64_t off64_t;
# define __off64_t_defined
# endif
# ifndef __useconds_t_defined
typedef __useconds_t useconds_t;
# define __useconds_t_defined
# endif
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
# endif
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
# ifndef __intptr_t_defined
typedef __intptr_t intptr_t;
# define __intptr_t_defined
# endif
#endif
#if defined __USE_BSD || defined __USE_XOPEN
# ifndef __socklen_t_defined
typedef __socklen_t socklen_t;
# define __socklen_t_defined
# endif
#endif
#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0
extern int access (__const char *__name, int __type) __THROW __nonnull ((1));
#ifdef __USE_GNU
extern int euidaccess (__const char *__name, int __type)
__THROW __nonnull ((1));
#endif
#ifndef _STDIO_H
# define SEEK_SET 0
# define SEEK_CUR 1
# define SEEK_END 2
#endif
#if defined __USE_BSD && !defined L_SET
# define L_SET SEEK_SET
# define L_INCR SEEK_CUR
# define L_XTND SEEK_END
#endif
#ifndef __USE_FILE_OFFSET64
extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
#else
# ifdef __REDIRECT_NTH
extern __off64_t __REDIRECT_NTH (lseek,
(int __fd, __off64_t __offset, int __whence),
lseek64);
# else
# define lseek lseek64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW;
#endif
extern int close (int __fd);
extern ssize_t read (int __fd, void *__buf, size_t __nbytes);
extern ssize_t write (int __fd, __const void *__buf, size_t __n);
#ifdef __USE_UNIX98
# ifndef __USE_FILE_OFFSET64
extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
__off_t __offset);
extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
__off_t __offset);
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset),
pread64);
extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
size_t __nbytes, __off64_t __offset),
pwrite64);
# else
# define pread pread64
# define pwrite pwrite64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset);
extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
__off64_t __offset);
# endif
#endif
extern int pipe (int __pipedes[2]) __THROW;
extern unsigned int alarm (unsigned int __seconds) __THROW;
extern unsigned int sleep (unsigned int __seconds);
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
__THROW;
extern int usleep (__useconds_t __useconds);
#endif
extern int pause (void);
extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
__THROW __nonnull ((1));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW;
extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
__THROW __nonnull ((1));
#endif
extern int chdir (__const char *__path) __THROW __nonnull ((1));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int fchdir (int __fd) __THROW;
#endif
it is as
big as necessary. */
extern char *getcwd (char *__buf, size_t __size) __THROW;
#ifdef __USE_GNU
extern char *get_current_dir_name (void) __THROW;
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern char *getwd (char *__buf) __THROW __nonnull ((1));
#endif
extern int dup (int __fd) __THROW;
extern int dup2 (int __fd, int __fd2) __THROW;
extern char **__environ;
#ifdef __USE_GNU
extern char **environ;
#endif
extern int execve (__const char *__path, char *__const __argv[],
char *__const __envp[]) __THROW __nonnull ((1));
#ifdef __USE_GNU
extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
__THROW;
#endif
extern int execv (__const char *__path, char *__const __argv[])
__THROW __nonnull ((1));
extern int execle (__const char *__path, __const char *__arg, ...)
__THROW __nonnull ((1));
extern int execl (__const char *__path, __const char *__arg, ...)
__THROW __nonnull ((1));
extern int execvp (__const char *__file, char *__const __argv[])
__THROW __nonnull ((1));
extern int execlp (__const char *__file, __const char *__arg, ...)
__THROW __nonnull ((1));
#if defined __USE_MISC || defined __USE_XOPEN
extern int nice (int __inc) __THROW;
#endif
extern void _exit (int __status) __attribute__ ((__noreturn__));
#include
extern long int pathconf (__const char *__path, int __name)
__THROW __nonnull ((1));
extern long int fpathconf (int __fd, int __name) __THROW;
extern long int sysconf (int __name) __THROW __attribute__ ((__const__));
#ifdef __USE_POSIX2
extern size_t confstr (int __name, char *__buf, size_t __len) __THROW;
#endif
extern __pid_t getpid (void) __THROW;
extern __pid_t getppid (void) __THROW;
#ifndef __FAVOR_BSD
extern __pid_t getpgrp (void) __THROW;
#else
# ifdef __REDIRECT_NTH
extern __pid_t __REDIRECT_NTH (getpgrp, (__pid_t __pid), __getpgid);
# else
# define getpgrp __getpgid
# endif
#endif
extern __pid_t __getpgid (__pid_t __pid) __THROW;
#ifdef __USE_XOPEN_EXTENDED
extern __pid_t getpgid (__pid_t __pid) __THROW;
#endif
extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW;
#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
# ifndef __FAVOR_BSD
extern int setpgrp (void) __THROW;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (setpgrp, (__pid_t __pid, __pid_t __pgrp), setpgid);
# else
# define setpgrp setpgid
# endif
# endif
#endif
extern __pid_t setsid (void) __THROW;
#ifdef __USE_XOPEN_EXTENDED
extern __pid_t getsid (__pid_t __pid) __THROW;
#endif
extern __uid_t getuid (void) __THROW;
extern __uid_t geteuid (void) __THROW;
extern __gid_t getgid (void) __THROW;
extern __gid_t getegid (void) __THROW;
extern int getgroups (int __size, __gid_t __list[]) __THROW;
#ifdef __USE_GNU
extern int group_member (__gid_t __gid) __THROW;
#endif
extern int setuid (__uid_t __uid) __THROW;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW;
#endif
#if defined __USE_BSD || defined __USE_XOPEN2K
extern int seteuid (__uid_t __uid) __THROW;
#endif
extern int setgid (__gid_t __gid) __THROW;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW;
#endif
#if defined __USE_BSD || defined __USE_XOPEN2K
extern int setegid (__gid_t __gid) __THROW;
#endif
#ifdef __USE_GNU
extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
#endif
extern __pid_t fork (void) __THROW;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern __pid_t vfork (void) __THROW;
#endif
extern char *ttyname (int __fd) __THROW;
extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
__THROW __nonnull ((2));
extern int isatty (int __fd) __THROW;
#if defined __USE_BSD \
|| (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)
extern int ttyslot (void) __THROW;
#endif
extern int link (__const char *__from, __const char *__to)
__THROW __nonnull ((1, 2));
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
extern int symlink (__const char *__from, __const char *__to)
__THROW __nonnull ((1, 2));
extern int readlink (__const char *__restrict __path, char *__restrict __buf,
size_t __len) __THROW __nonnull ((1, 2));
#endif
extern int unlink (__const char *__name) __THROW __nonnull ((1));
extern int rmdir (__const char *__path) __THROW __nonnull ((1));
extern __pid_t tcgetpgrp (int __fd) __THROW;
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW;
extern char *getlogin (void);
#if defined __USE_REENTRANT || defined __USE_UNIX98
extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1));
#endif
#ifdef __USE_BSD
extern int setlogin (__const char *__name) __THROW __nonnull ((1));
#endif
#ifdef __USE_POSIX2
# define __need_getopt
# include
#endif
#if defined __USE_BSD || defined __USE_UNIX98
extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1));
#endif
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
extern int sethostname (__const char *__name, size_t __len)
__THROW __nonnull ((1));
extern int sethostid (long int __id) __THROW;
extern int getdomainname (char *__name, size_t __len)
__THROW __nonnull ((1));
extern int setdomainname (__const char *__name, size_t __len)
__THROW __nonnull ((1));
extern int vhangup (void) __THROW;
extern int revoke (__const char *__file) __THROW __nonnull ((1));
extern int profil (unsigned short int *__sample_buffer, size_t __size,
size_t __offset, unsigned int __scale)
__THROW __nonnull ((1));
extern int acct (__const char *__name) __THROW __nonnull ((1));
extern char *getusershell (void) __THROW;
extern void endusershell (void) __THROW;
extern void setusershell (void) __THROW;
extern int daemon (int __nochdir, int __noclose) __THROW;
#endif
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
extern int chroot (__const char *__path) __THROW __nonnull ((1));
extern char *getpass (__const char *__prompt) __nonnull ((1));
#endif
#if defined __USE_BSD || defined __USE_XOPEN
extern int fsync (int __fd);
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern long int gethostid (void);
extern void sync (void) __THROW;
extern int getpagesize (void) __THROW __attribute__ ((__const__));
extern int getdtablesize (void) __THROW;
# ifndef __USE_FILE_OFFSET64
extern int truncate (__const char *__file, __off_t __length)
__THROW __nonnull ((1));
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (truncate,
(__const char *__file, __off64_t __length),
truncate64) __nonnull ((1));
# else
# define truncate truncate64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int truncate64 (__const char *__file, __off64_t __length)
__THROW __nonnull ((1));
# endif
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
# ifndef __USE_FILE_OFFSET64
extern int ftruncate (int __fd, __off_t __length) __THROW;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length),
ftruncate64);
# else
# define ftruncate ftruncate64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int ftruncate64 (int __fd, __off64_t __length) __THROW;
# endif
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
") to ADDR.
Returns zero on success and -1 for errors (with errno set). */
extern int brk (void *__addr) __THROW;
extern void *sbrk (intptr_t __delta) __THROW;
#endif
#ifdef __USE_MISC
extern long int syscall (long int __sysno, ...) __THROW;
#endif
#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) && !defined F_LOCK
# define F_ULOCK 0
# define F_LOCK 1
# define F_TLOCK 2
# define F_TEST 3
# ifndef __USE_FILE_OFFSET64
extern int lockf (int __fd, int __cmd, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len),
lockf64);
# else
# define lockf lockf64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int lockf64 (int __fd, int __cmd, __off64_t __len);
# endif
#endif
#ifdef __USE_GNU
# define TEMP_FAILURE_RETRY(expression) \
(__extension__ \
({ long int __result; \
do __result = (long int) (expression); \
while (__result == -1L && errno == EINTR); \
__result; }))
#endif
#if defined __USE_POSIX199309 || defined __USE_UNIX98
extern int fdatasync (int __fildes) __THROW;
#endif
#ifdef __USE_XOPEN
extern char *crypt (__const char *__key, __const char *__salt)
__THROW __nonnull ((1, 2));
extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1));
extern void swab (__const void *__restrict __from, void *__restrict __to,
ssize_t __n) __THROW __nonnull ((1, 2));
#endif
#ifdef __USE_XOPEN
extern char *ctermid (char *__s) __THROW __nonnull ((1));
#endif
__END_DECLS
#endif
|