// POSIX file-control declarations currently implemented by nt-lite. #pragma once #include #include #define O_RDONLY 0x0000 #define O_WRONLY 0x0001 #define O_RDWR 0x0002 #define O_CREAT 0x0040 #define O_TRUNC 0x0200 #define O_APPEND 0x0400 #define O_NONBLOCK 0x0800 #define O_ACCMODE 0x0003 #define F_DUPFD 0 #define F_GETFD 1 #define F_SETFD 2 #define F_GETFL 3 #define F_SETFL 4 #define F_GETLK 5 #define F_SETLK 6 #define F_SETLKW 7 #define F_RDLCK 0 #define F_WRLCK 1 #define F_UNLCK 2 #define FD_CLOEXEC 1 struct flock { short l_type; short l_whence; off_t l_start; off_t l_len; pid_t l_pid; }; NTL_POSIX_API int open(const char* path, int flags, ...); NTL_POSIX_API int fcntl(int fd, int command, ...);