OrionLibC
Barry Importing existing Orion LibC 03048a9 (2 years, 2 months ago)diff --git a/include/unistd.h b/include/unistd.h new file mode 100644 index 0000000..c250e84 --- /dev/null +++ b/include/unistd.h @@ -0,0 +1,46 @@ +#ifndef _UNISTD_H +#define _UNISTD_H + +#include <sys/types.h> +#include <stddef.h> + +typedef int intptr_t; + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + +#ifdef __cplusplus +extern "C" { +#endif + +int execv(const char *, char *[]); +int execve(const char *, char *[], char *[]); +int execvp(const char *, char *[]); +pid_t fork(void); +pid_t getpid(void); +uid_t getuid(void); +int setuid(uid_t uid); +uid_t geteuid(void); +int seteuid(uid_t euid); +gid_t getgid(void); +int setgid(gid_t gid); +gid_t getegid(void); +int setegid(gid_t egid); +int isatty(int fd); +int close(int fd); +int dup(int oldfd); +int dup2(int oldfd, int newfd); +size_t read(int fd, void *buf, size_t count); +size_t write(int fd, void *buf, size_t count); +off_t lseek(int fd, off_t offset, int whence); +int rmdir(const char *pathname); +int chroot(const char *path); +int chdir(const char *path); +char *getcwd(char *buf, size_t size); + +#ifdef __cplusplus +} +#endif + +#endif