From aa772a7db979a97fe1a228e94c3163f2c154754e Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Thu, 16 Apr 2020 01:37:06 -0700 Subject: [PATCH] Update to libuv 1.36.0 --- CMakeLists.txt | 2 +- deps/libuv | 2 +- src/fs.c | 16 ++++++++++++++++ src/luv.c | 3 +++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9731c140..3230fdda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ endif() project (luv C ASM) set(LUV_VERSION_MAJOR 1) -set(LUV_VERSION_MINOR 35) +set(LUV_VERSION_MINOR 36) set(LUV_VERSION_PATCH 0) set(LUV_VERSION ${LUV_VERSION_MAJOR}.${LUV_VERSION_MINOR}.${LUV_VERSION_PATCH}) diff --git a/deps/libuv b/deps/libuv index e45f1ec3..533b7388 160000 --- a/deps/libuv +++ b/deps/libuv @@ -1 +1 @@ -Subproject commit e45f1ec38db882f8dc17b51f51a6684027034609 +Subproject commit 533b738838ad8407032e14b6772b29ef9af63cfa diff --git a/src/fs.c b/src/fs.c index 75505f6b..44058882 100644 --- a/src/fs.c +++ b/src/fs.c @@ -249,6 +249,9 @@ static int push_fs_result(lua_State* L, uv_fs_t* req) { #endif case UV_FS_UTIME: case UV_FS_FUTIME: +#if LUV_UV_VERSION_GEQ(1, 36, 0) + case UV_FS_LUTIME: +#endif #if LUV_UV_VERSION_GEQ(1, 14, 0) case UV_FS_COPYFILE: #endif @@ -678,6 +681,19 @@ static int luv_fs_futime(lua_State* L) { FS_CALL(futime, req, file, atime, mtime); } +#if LUV_UV_VERSION_GEQ(1, 36, 0) +static int luv_fs_lutime(lua_State* L) { + luv_ctx_t* ctx = luv_context(L); + const char* path = luaL_checkstring(L, 1); + double atime = luaL_checknumber(L, 2); + double mtime = luaL_checknumber(L, 3); + int ref = luv_check_continuation(L, 4); + uv_fs_t* req = (uv_fs_t*)lua_newuserdata(L, sizeof(*req)); + req->data = luv_setup_req(L, ctx, ref); + FS_CALL(lutime, req, path, atime, mtime); +} +#endif + static int luv_fs_link(lua_State* L) { luv_ctx_t* ctx = luv_context(L); const char* path = luaL_checkstring(L, 1); diff --git a/src/luv.c b/src/luv.c index 2b561f5e..eea50d66 100644 --- a/src/luv.c +++ b/src/luv.c @@ -237,6 +237,9 @@ static const luaL_Reg luv_functions[] = { {"fs_fchmod", luv_fs_fchmod}, {"fs_utime", luv_fs_utime}, {"fs_futime", luv_fs_futime}, +#if LUV_UV_VERSION_GEQ(1, 36, 0) + {"fs_lutime", luv_fs_lutime}, +#endif {"fs_link", luv_fs_link}, {"fs_symlink", luv_fs_symlink}, {"fs_readlink", luv_fs_readlink},