[gcc(refs/users/guojiufu/heads/guojiufu-branch)] [Ada] Fix socket timeout correction for Windows Server 2019 case
Jiu Fu Guo
guojiufu@gcc.gnu.org
Wed Jun 10 03:42:46 GMT 2020
https://gcc.gnu.org/g:8472d81ea00dc16a55b55a21ed34499390604941
commit 8472d81ea00dc16a55b55a21ed34499390604941
Author: Dmitriy Anisimkov <anisimko@adacore.com>
Date: Thu Feb 6 16:25:06 2020 +0600
[Ada] Fix socket timeout correction for Windows Server 2019 case
2020-06-08 Dmitriy Anisimkov <anisimko@adacore.com>
gcc/ada/
* socket.c (__gnat_minus_500ms): Remove
IsWindowsVersionOrGreater from condition.
Diff:
---
gcc/ada/socket.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
index 83e9480cbde..4e367901837 100644
--- a/gcc/ada/socket.c
+++ b/gcc/ada/socket.c
@@ -801,10 +801,12 @@ const char * __gnat_gai_strerror(int errcode) {
int __gnat_minus_500ms() {
#if defined (_WIN32)
- // Windows Server 2019 and Windows 8.0 do not need 500 millisecond socket
- // timeout correction.
- return !(IsWindows8OrGreater() && !IsWindowsServer()
- || IsWindowsVersionOrGreater(10, 0, 17763));
+ // Windows 8.0 and newer do not need 500 millisecond socket timeout
+ // correction.
+ // We do not know the Windows server version without socket timeout
+ // correction for now. When we know, we can add the call for
+ // IsWindowsVersionOrGreater(10, 0, ????) into condition.
+ return !IsWindows8OrGreater() || IsWindowsServer();
#else
return 0;
#endif
More information about the Gcc-cvs
mailing list