summaryrefslogtreecommitdiffstats
path: root/src/win/core.c
diff options
context:
space:
mode:
authorlibuv upstream <libuv@googlegroups.com>2019-06-10 13:17:21 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-18 11:45:34 (GMT)
commitb4069b04ff63b327ff4881282200c3c73fded34d (patch)
treef1c97b98e2253ec8e4a9b75ee2f8f99426e9b2f6 /src/win/core.c
parent4fcb0d0213112bb2fdb04bb27e82543b93cfe41d (diff)
downloadCMake-b4069b04ff63b327ff4881282200c3c73fded34d.zip
CMake-b4069b04ff63b327ff4881282200c3c73fded34d.tar.gz
CMake-b4069b04ff63b327ff4881282200c3c73fded34d.tar.bz2
libuv 2019-06-10 (ee24ce90)
Code extracted from: https://github.com/libuv/libuv.git at commit ee24ce900e5714c950b248da2bdd311b01c983be (v1.x).
Diffstat (limited to 'src/win/core.c')
-rw-r--r--src/win/core.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/win/core.c b/src/win/core.c
index bf80d77..e9d0a58 100644
--- a/src/win/core.c
+++ b/src/win/core.c
@@ -623,3 +623,30 @@ int uv__socket_sockopt(uv_handle_t* handle, int optname, int* value) {
return 0;
}
+
+int uv_cpumask_size(void) {
+ return (int)(sizeof(DWORD_PTR) * 8);
+}
+
+int uv__getsockpeername(const uv_handle_t* handle,
+ uv__peersockfunc func,
+ struct sockaddr* name,
+ int* namelen,
+ int delayed_error) {
+
+ int result;
+ uv_os_fd_t fd;
+
+ result = uv_fileno(handle, &fd);
+ if (result != 0)
+ return result;
+
+ if (delayed_error)
+ return uv_translate_sys_error(delayed_error);
+
+ result = func((SOCKET) fd, name, namelen);
+ if (result != 0)
+ return uv_translate_sys_error(WSAGetLastError());
+
+ return 0;
+}