[Ada] GNAT.Sockets: fix socket timeout on recent Windows versions
authorDmitriy Anisimkov <anisimko@adacore.com>
Thu, 4 Jul 2019 08:05:13 +0000 (08:05 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 4 Jul 2019 08:05:13 +0000 (08:05 +0000)
commitb7d5159ec9fcc229e47392dc0dfec191d361b398
tree1728f625585772a56f8e449aaa314216359cdac1
parent1708a783b500003d88940ba6ef417efaf045bbc1
[Ada] GNAT.Sockets: fix socket timeout on recent Windows versions

2019-07-04  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

* doc/gnat_ugn/platform_specific_information.rst: Document
Windows socket timeout particularity.
* gnat_ugn.texi: Regenerate.
* gsocket.h: Include versionhelpers.h.
* socket.c (__gnat_minus_500ms): New function.
* libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): New
imported function.
* libgnat/g-socket.adb (Set_Socket_Option): Refactor to remove
500ms from the requested timeout only on old Windows version.

From-SVN: r273045
gcc/ada/ChangeLog
gcc/ada/doc/gnat_ugn/platform_specific_information.rst
gcc/ada/gnat_ugn.texi
gcc/ada/gsocket.h
gcc/ada/libgnat/g-socket.adb
gcc/ada/libgnat/g-sothco.ads
gcc/ada/socket.c