Makefile.rtl (GNAT.Sockets.Thin_Common): New unit.
authorThomas Quinot <quinot@adacore.com>
Tue, 20 May 2008 12:43:29 +0000 (14:43 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 20 May 2008 12:43:29 +0000 (14:43 +0200)
commitf983388f047887129979657d9d98b2185a5c90ca
treed477bc164e38f6d8c8babcee4149043637f10957
parent019026537472eae913ccac60774d6e6801c121f8
Makefile.rtl (GNAT.Sockets.Thin_Common): New unit.

2008-05-20  Thomas Quinot  <quinot@adacore.com>

* Makefile.rtl (GNAT.Sockets.Thin_Common): New unit.

* g-sttsne-vxworks.adb: Add missing dependency on Sockets.Constants.
Add missing "with" of Ada.Unchecked_Conversion

* g-soccon-linux-ppc.ads, g-soccon-linux-64.ads, g-soccon-lynxos.ads,
g-soccon-linux-x86.ads, g-soccon-hpux-ia64.ads,
g-soccon-solaris-64.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-vxworks.ads,
g-socthi-vxworks.adb, g-soccon-freebsd.ads, g-soccon.ads:
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.
New constant SIZEOF_fd_set
New flag Has_Sockaddr_Len
New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6

* g-stsifd-sockets.adb
(Create): Remove call to Set_Length; use Set_Family to set the family
and (on appropriate platforms) length fields in struct sockaddr.

* g-socthi.adb, g-socthi.ads, g-socthi-vms.ads, g-socthi-vms.adb,
g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.adb,
g-soccon-darwin.ads, g-soccon-darwin.ads: New constant SIZEOF_fd_set
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.

* g-socket.ads, g-socket.adb:
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.
(Connect_Socket, Accept_Socket): Provide new versions of these two
routines that operate with a user specified timeout.
(Bind_Socket, Connect_Socket, Send_Socket): Remove calls to Set_Length,
this is now handled automatically by Set_Family on platforms that
require it.

* gen-soccon.c:
Move common code out of GNAT.Sockets.Thin implementations and into
Thin_Common.
(SIZEOF_sockaddr_in6): On platforms where IPv6 is not supported, define
this constant to 0 (not -1) because we use it to initialize an
unsigned_char value.
Align values for numeric constants only.
Handle the case of systems that do not support AF_INET6.
New constant SIZEOF_fd_set
New flag Has_Sockaddr_Len
New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6

* gsocket.h: New flag Has_Sockaddr_Len
New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6

From-SVN: r135612
31 files changed:
gcc/ada/Makefile.rtl
gcc/ada/g-soccon-aix.ads
gcc/ada/g-soccon-darwin.ads
gcc/ada/g-soccon-freebsd.ads
gcc/ada/g-soccon-hpux-ia64.ads
gcc/ada/g-soccon-hpux.ads
gcc/ada/g-soccon-irix.ads
gcc/ada/g-soccon-linux-64.ads
gcc/ada/g-soccon-linux-ppc.ads
gcc/ada/g-soccon-linux-x86.ads
gcc/ada/g-soccon-lynxos.ads
gcc/ada/g-soccon-mingw.ads
gcc/ada/g-soccon-solaris-64.ads
gcc/ada/g-soccon-solaris.ads
gcc/ada/g-soccon-tru64.ads
gcc/ada/g-soccon-vms.ads
gcc/ada/g-soccon-vxworks.ads
gcc/ada/g-soccon.ads
gcc/ada/g-socket.adb
gcc/ada/g-socket.ads
gcc/ada/g-socthi-mingw.adb
gcc/ada/g-socthi-mingw.ads
gcc/ada/g-socthi-vms.adb
gcc/ada/g-socthi-vms.ads
gcc/ada/g-socthi-vxworks.adb
gcc/ada/g-socthi.adb
gcc/ada/g-socthi.ads
gcc/ada/g-stsifd-sockets.adb
gcc/ada/g-sttsne-vxworks.adb
gcc/ada/gen-soccon.c
gcc/ada/gsocket.h