[Ada] Fix socket timeout correction for Windows Server 2019 case
authorDmitriy Anisimkov <anisimko@adacore.com>
Thu, 6 Feb 2020 10:25:06 +0000 (16:25 +0600)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 8 Jun 2020 07:50:52 +0000 (03:50 -0400)
2020-06-08  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

* socket.c (__gnat_minus_500ms): Remove
IsWindowsVersionOrGreater from condition.

gcc/ada/socket.c

index 83e9480..4e36790 100644 (file)
@@ -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