mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 13:08:33 +00:00
os_open: impl mch_open with libuv. ref #133
- use return value instead of open_req.result - libuv uv_fs_open() returns `-errno` instead of always -1 - libuv always sets open_req.result to the return value, _except_ for OOM where it only sets the return value. So always use the return value. - replace calls to mch_open macro. - update call sites expecting -1 error
This commit is contained in:
@@ -2372,9 +2372,9 @@ int source_level(void *cookie)
|
||||
*/
|
||||
static FILE *fopen_noinh_readbin(char *filename)
|
||||
{
|
||||
int fd_tmp = mch_open(filename, O_RDONLY, 0);
|
||||
int fd_tmp = os_open(filename, O_RDONLY, 0);
|
||||
|
||||
if (fd_tmp == -1)
|
||||
if (fd_tmp < 0)
|
||||
return NULL;
|
||||
|
||||
# ifdef HAVE_FD_CLOEXEC
|
||||
|
Reference in New Issue
Block a user