From the official documentation we have the following signature for
int uv_fs_open(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, int mode, uv_fs_cb cb);
flags and mode are standard Unix flags. libuv takes care of converting to the appropriate Windows flags.
uv_fs_open(my_loop, my_req, my_filename, O_RDWR | O_CREAT, S_IRWXU, my_callback);
'O_RDWR': undeclared identifier
'O_CREAT': undeclared identifier
'S_IRWXU': undeclared identifier
To be able to use
uv_fs_open on Windows, users have to:
fcntl.h explicitly, because
uv-win.h doesn't include it (see this issue for further details)
_O_RDWR_ and so on instead of
O_RDWR and the others (see the official documentation for further details)
Something similar applies to the mode and details on the available constants can be found in the linked documentation.