now working with libuv v1.25.x
This commit is contained in:
parent
af3d06f3b4
commit
27dc68dd84
@ -16,7 +16,7 @@ endif()
|
||||
# Project configuration
|
||||
#
|
||||
|
||||
project(uvw VERSION 1.12.0)
|
||||
project(uvw VERSION 1.13.0)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
@ -144,6 +144,7 @@ install(
|
||||
add_custom_target(
|
||||
uvw_aob
|
||||
SOURCES
|
||||
cmake/in/deps.in
|
||||
appveyor.yml
|
||||
AUTHORS
|
||||
LICENSE
|
||||
|
||||
@ -17,7 +17,7 @@ ExternalProject_Add(
|
||||
ExternalProject_Add(
|
||||
libuv
|
||||
GIT_REPOSITORY https://github.com/libuv/libuv.git
|
||||
GIT_TAG v1.24.0
|
||||
GIT_TAG v1.25.0
|
||||
SOURCE_DIR @LIBUV_DEPS_DIR@
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
|
||||
@ -278,6 +278,55 @@ private:
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Utility class.
|
||||
*
|
||||
* This class can be used to get name and information about the current kernel.
|
||||
* The populated data includes the operating system name, release, version, and
|
||||
* machine.
|
||||
*
|
||||
* \sa Utilities::uname
|
||||
*/
|
||||
struct UName {
|
||||
UName(std::shared_ptr<uv_utsname_t> utsname): utsname{utsname} {}
|
||||
|
||||
/**
|
||||
* @brief Gets the operating system name (like "Linux").
|
||||
* @return The operating system name.
|
||||
*/
|
||||
std::string sysname() const noexcept {
|
||||
return utsname ? utsname->sysname : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the operating system release (like "2.6.28").
|
||||
* @return The operating system release.
|
||||
*/
|
||||
std::string release() const noexcept {
|
||||
return utsname ? utsname->release : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the operating system version.
|
||||
* @return The operating system version
|
||||
*/
|
||||
std::string version() const noexcept {
|
||||
return utsname ? utsname->version : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the hardware identifier.
|
||||
* @return The hardware identifier.
|
||||
*/
|
||||
std::string machine() const noexcept {
|
||||
return utsname ? utsname->machine : "";
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<uv_utsname_t> utsname;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief The IPv4 tag.
|
||||
*
|
||||
@ -521,6 +570,21 @@ struct Utilities {
|
||||
return details::tryRead(&uv_os_gethostname);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets name and information about the current kernel.
|
||||
*
|
||||
* This function can be used to get name and information about the
|
||||
* current kernel. The populated data includes the operating system
|
||||
* name, release, version, and machine.
|
||||
*
|
||||
* @return Name and information about the current kernel.
|
||||
*/
|
||||
static UName uname() noexcept {
|
||||
auto ptr = std::make_shared<uv_utsname_t>();
|
||||
uv_os_uname(ptr.get());
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets a subset of the password file entry.
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user