diff options
author | dnobori <da.git@softether.co.jp> | 2014-02-16 22:16:50 +0400 |
---|---|---|
committer | dnobori <da.git@softether.co.jp> | 2014-02-16 22:16:50 +0400 |
commit | e8ce5fa014737874eee79894af99f35b91b02574 (patch) | |
tree | 07fe12941e2e46a3ec81b976a681b64607ba63b3 /src/Mayaqua | |
parent | bad6a4c22baf11b855e2afbf3e9960ef7d013a50 (diff) |
v4.05-9422-beta
Diffstat (limited to 'src/Mayaqua')
-rw-r--r-- | src/Mayaqua/Microsoft.c | 31 | ||||
-rw-r--r-- | src/Mayaqua/Microsoft.h | 1 | ||||
-rw-r--r-- | src/Mayaqua/Network.c | 8 |
3 files changed, 35 insertions, 5 deletions
diff --git a/src/Mayaqua/Microsoft.c b/src/Mayaqua/Microsoft.c index f19c374b..7b249267 100644 --- a/src/Mayaqua/Microsoft.c +++ b/src/Mayaqua/Microsoft.c @@ -8667,7 +8667,36 @@ bool MsIsWindows7() return false;
}
-// Determine whether it's Windows 8 later
+// Determine whether it's Windows 8.1 or later
+bool MsIsWindows81()
+{
+ OS_INFO *info = GetOsInfo();
+
+ if (info == NULL)
+ {
+ return false;
+ }
+
+ if (OS_IS_WINDOWS_NT(info->OsType))
+ {
+ if (GET_KETA(info->OsType, 100) == 7)
+ {
+ if (GET_KETA(info->OsType, 1) >= 1)
+ {
+ return true;
+ }
+ }
+
+ if (GET_KETA(info->OsType, 100) >= 8)
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// Determine whether it's Windows 8 or later
bool MsIsWindows8()
{
OS_INFO *info = GetOsInfo();
diff --git a/src/Mayaqua/Microsoft.h b/src/Mayaqua/Microsoft.h index 7cc7dbb5..b4798c18 100644 --- a/src/Mayaqua/Microsoft.h +++ b/src/Mayaqua/Microsoft.h @@ -974,6 +974,7 @@ bool MsIsIA64(); void *MsDisableWow64FileSystemRedirection();
void MsRestoreWow64FileSystemRedirection(void *p);
void MsSetWow64FileSystemRedirectionEnable(bool enable);
+bool MsIsWindows81();
bool MsIsWindows8();
bool MsIsWindows7();
bool MsIsInfCatalogRequired();
diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c index 6d68bf8a..113bff66 100644 --- a/src/Mayaqua/Network.c +++ b/src/Mayaqua/Network.c @@ -11396,7 +11396,7 @@ UINT RecvFrom(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) sock->IgnoreRecvErr = false;
#ifdef OS_WIN32
- if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
+ if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAENETRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEHOSTUNREACH || WSAGetLastError() == WSAEUSERS)
{
sock->IgnoreRecvErr = true;
@@ -11476,7 +11476,7 @@ UINT RecvFrom6(SOCK *sock, IP *src_addr, UINT *src_port, void *data, UINT size) sock->IgnoreRecvErr = false;
#ifdef OS_WIN32
- if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
+ if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAENETRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEHOSTUNREACH || WSAGetLastError() == WSAEUSERS)
{
sock->IgnoreRecvErr = true;
@@ -11588,7 +11588,7 @@ UINT SendToEx(SOCK *sock, IP *dest_addr, UINT dest_port, void *data, UINT size, sock->IgnoreSendErr = false;
#ifdef OS_WIN32
- if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
+ if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAENETRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEHOSTUNREACH || WSAGetLastError() == WSAEUSERS || WSAGetLastError() == WSAEINVAL)
{
sock->IgnoreSendErr = true;
@@ -11691,7 +11691,7 @@ UINT SendTo6Ex(SOCK *sock, IP *dest_addr, UINT dest_port, void *data, UINT size, sock->IgnoreSendErr = false;
#ifdef OS_WIN32
- if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
+ if (WSAGetLastError() == WSAECONNRESET || WSAGetLastError() == WSAENETRESET || WSAGetLastError() == WSAEMSGSIZE || WSAGetLastError() == WSAENETUNREACH ||
WSAGetLastError() == WSAENOBUFS || WSAGetLastError() == WSAEHOSTUNREACH || WSAGetLastError() == WSAEUSERS || WSAGetLastError() == WSAEINVAL)
{
sock->IgnoreSendErr = true;
|