From 46d9c66db10a698ddc67a68d5bbd921cd1cab2a4 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sun, 3 Dec 2017 15:32:27 +0100 Subject: [PATCH] now working with libuv v1.18.0 --- CMakeLists.txt | 16 +++++++++++++++- cmake/in/libuv.in | 4 ++-- src/uvw/util.hpp | 15 ++++++++++++++- test/uvw/util.cpp | 1 + 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 618254b1..4ba73d7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ endif() # Project configuration # -project(uvw VERSION 1.5.0) +project(uvw VERSION 1.6.0) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) @@ -118,3 +118,17 @@ set(CPACK_SOURCE_GENERATOR TGZ) set(CPACK_PACKAGING_INSTALL_DIRECTORY "uvw-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") include(CPack) + +# +# AOB +# + +add_custom_target( + uvw_aob + SOURCES + appveyor.yml + AUTHORS + LICENSE + README.md + .travis.yml +) diff --git a/cmake/in/libuv.in b/cmake/in/libuv.in index 95a078c3..49d95f2f 100644 --- a/cmake/in/libuv.in +++ b/cmake/in/libuv.in @@ -7,7 +7,7 @@ if(WIN32) ExternalProject_Add( libuv GIT_REPOSITORY https://github.com/libuv/libuv.git - GIT_TAG v1.17.0 + GIT_TAG v1.18.0 DOWNLOAD_DIR ${LIBUV_DEPS_DIR} TMP_DIR ${LIBUV_DEPS_DIR}/tmp STAMP_DIR ${LIBUV_DEPS_DIR}/stamp @@ -22,7 +22,7 @@ else() ExternalProject_Add( libuv GIT_REPOSITORY https://github.com/libuv/libuv.git - GIT_TAG v1.17.0 + GIT_TAG v1.18.0 DOWNLOAD_DIR ${LIBUV_DEPS_DIR} TMP_DIR ${LIBUV_DEPS_DIR}/tmp STAMP_DIR ${LIBUV_DEPS_DIR}/stamp diff --git a/src/uvw/util.hpp b/src/uvw/util.hpp index 49b88863..17ff8f64 100644 --- a/src/uvw/util.hpp +++ b/src/uvw/util.hpp @@ -438,6 +438,19 @@ struct Utilities { * @brief OS dedicated utilities. */ struct OS { + /** + * @brief Returns the current process id. + * + * See the official + * [documentation](http://docs.libuv.org/en/v1.x/misc.html#c.uv_os_getpid) + * for further details. + * + * @return The current process id. + */ + static PidType pid() noexcept { + return uv_os_getpid(); + } + /** * @brief Returns the parent process id. * @@ -447,7 +460,7 @@ struct Utilities { * * @return The parent process id. */ - static PidType pid() noexcept { + static PidType parent() noexcept { return uv_os_getppid(); } diff --git a/test/uvw/util.cpp b/test/uvw/util.cpp index 60ee8714..16174c4e 100644 --- a/test/uvw/util.cpp +++ b/test/uvw/util.cpp @@ -76,6 +76,7 @@ TEST(Util, Utilities) { ASSERT_EQ(uvw::PidType{}, uvw::PidType{}); ASSERT_NE(uvw::Utilities::OS::pid(), uvw::PidType{}); + ASSERT_NE(uvw::Utilities::OS::parent(), uvw::PidType{}); ASSERT_FALSE(uvw::Utilities::OS::homedir().empty()); ASSERT_FALSE(uvw::Utilities::OS::tmpdir().empty()); ASSERT_NE(uvw::Utilities::OS::hostname(), "");