#ifndef _UNISTD_H
#define _UNISTD_H

#include <sys/types.h>

#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2

#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0

#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2

ssize_t read(int fd, void *buf, size_t count);
ssize_t write(int fd, const void *buf, size_t count);
int close(int fd);
int pipe(int pipefd[2]);
int dup2(int oldfd, int newfd);
pid_t fork(void);
int execv(const char *path, char *const argv[]);
int execve(const char *pathname, char *const argv[], char *const envp[]);
void _exit(int status);
unsigned int sleep(unsigned int seconds);
int chdir(const char *path);
char *getcwd(char *buf, size_t size);
uid_t getuid(void);
uid_t geteuid(void);
gid_t getgid(void);
gid_t getegid(void);
int access(const char *pathname, int mode);
int isatty(int fd);
int unlink(const char *pathname);
off_t lseek(int fd, off_t offset, int whence);
int link(const char *oldpath, const char *newpath);
int rmdir(const char *pathname);
int getpid(void);
int getppid(void);
int setuid(uid_t uid);
int setgid(gid_t gid);
int setpgid(pid_t pid, pid_t pgid);
pid_t getpgrp(void);
pid_t tcgetpgrp(int fd);
int tcsetpgrp(int fd, pid_t pgrp);
unsigned int alarm(unsigned int seconds);
int seteuid(uid_t euid);
int setegid(gid_t egid);
ssize_t readlink(const char *pathname, char *buf, size_t objsiz);

#endif
