13 #ifndef __STOUT_OS_WINDOWS_FCNTL_HPP__
14 #define __STOUT_OS_WINDOWS_FCNTL_HPP__
16 #include <glog/logging.h>
25 #define O_RDONLY _O_RDONLY
26 #define O_WRONLY _O_WRONLY
27 #define O_RDWR _O_RDWR
28 #define O_CREAT _O_CREAT
29 #define O_TRUNC _O_TRUNC
30 #define O_APPEND _O_APPEND
31 #define O_CLOEXEC _O_NOINHERIT
38 VLOG(2) <<
"`os::cloexec` has been called, but is a no-op on Windows";
46 VLOG(2) <<
"`os::unsetCloexec` has been called, but is a no-op on Windows";
53 VLOG(2) <<
"`os::isCloexec` has been called, but is a stub on Windows";
67 const u_long non_block_mode = 1;
68 u_long
mode = non_block_mode;
70 int result = ioctlsocket(fd, FIONBIO, &mode);
71 if (result != NO_ERROR) {
84 VLOG(2) <<
"`os::isNonblock` has been called, but is a stub on Windows";
90 #endif // __STOUT_OS_WINDOWS_FCNTL_HPP__
Definition: nothing.hpp:16
Type type() const
Definition: fd.hpp:121
Try< bool > isNonblock(int fd)
Definition: fcntl.hpp:87
Definition: error.hpp:120
Try< bool > isCloexec(int fd)
Definition: fcntl.hpp:59
Try< Nothing > nonblock(int fd)
Definition: fcntl.hpp:71
Try< Nothing > cloexec(int fd)
Definition: fcntl.hpp:27
Try< Nothing > unsetCloexec(int fd)
Definition: fcntl.hpp:43
Try< mode_t > mode(const std::string &path, const FollowSymlink follow=FollowSymlink::FOLLOW_SYMLINK)
Definition: stat.hpp:126