// POSIX process, path, and byte-stream declarations for nt-lite. #pragma once #include #include #include #include #define _POSIX_VERSION NTL_POSIX_PROFILE_VERSION #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #define PIPE_BUF 4096 NTL_POSIX_API ssize_t read(int fd, void* buffer, size_t count); NTL_POSIX_API ssize_t write(int fd, const void* buffer, size_t count); NTL_POSIX_API int close(int fd); NTL_POSIX_API int dup(int oldfd); NTL_POSIX_API int dup2(int oldfd, int newfd); NTL_POSIX_API int pipe(int pipefd[2]); NTL_POSIX_API off_t lseek(int fd, off_t offset, int whence); NTL_POSIX_API int chdir(const char* path); NTL_POSIX_API char* getcwd(char* buffer, size_t size); NTL_POSIX_API int unlink(const char* path); NTL_POSIX_API pid_t getpid(void); NTL_POSIX_API pid_t getppid(void); NTL_POSIX_API pid_t vfork(void); NTL_POSIX_API int execve(const char* path, char* const argv[], char* const envp[]); NTL_POSIX_API void _exit(int status); NTL_POSIX_API unsigned int alarm(unsigned int seconds); NTL_POSIX_API int pause(void); NTL_POSIX_API unsigned int sleep(unsigned int seconds); NTL_POSIX_API uid_t getuid(void); NTL_POSIX_API uid_t geteuid(void); NTL_POSIX_API gid_t getgid(void); NTL_POSIX_API gid_t getegid(void); NTL_POSIX_API int setuid(uid_t uid); NTL_POSIX_API int setgid(gid_t gid); NTL_POSIX_API int getgroups(int size, gid_t list[]); NTL_POSIX_API char* getlogin(void); NTL_POSIX_API pid_t getpgrp(void); NTL_POSIX_API int setpgid(pid_t pid, pid_t pgid); NTL_POSIX_API pid_t setsid(void);