[Ada] GNAT.Sockets: refactor Has_Sockaddr_Len
authorDmitriy Anisimkov <anisimko@adacore.com>
Mon, 1 Jul 2019 13:37:16 +0000 (13:37 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 1 Jul 2019 13:37:16 +0000 (13:37 +0000)
commita2902a6f2347f480952b53f08d7868afc8116071
tree31042efc8bb4acd160533cad026d6998eecfd143
parentd8f8b16648d012d68ccb148a808c9a404960ea20
[Ada] GNAT.Sockets: refactor Has_Sockaddr_Len

Use a field offset computation trick to avoid maintaining a list of
platforms.

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

gcc/ada/

* gsocket.h (Has_Sockaddr_Len): Use the offset of sin_family offset in
the sockaddr_in structure to determine the existence of length field
before the sin_family.

From-SVN: r272877
gcc/ada/ChangeLog
gcc/ada/gsocket.h