]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] New routine GNAT.Sockets.Create_Socket_Pair
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2019 08:14:18 +0000 (08:14 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2019 08:14:18 +0000 (08:14 +0000)
commita98be6bcec509735b2d81b30d48f476985a41088
tree8df8eec1c680c1ed52929a63b3f2f0b32266ec62
parentbbc3d666a8c5e60540ad60206295d21b8a09a96f
[Ada] New routine GNAT.Sockets.Create_Socket_Pair

New routine to create 2 connected sockets. This routine is analog of the
UNIX system call socketpair. On UNIX platforms it is implemented on the
base of socketpair. On other platforms it is implemented by conecting
network sockets over loopback interface.

2019-09-19  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

* libgnat/g-socket.ads, libgnat/g-socket.adb
(Create_Socket_Pair): New routine.
* libgnat/g-socthi.ads (OS_Has_Socketpair): Boolean constant.
(C_Socketpair): New imported routine.
* libgnat/g-socthi__mingw.ads, libgnat/g-socthi__vxworks.ads
(Default_Socket_Pair_Family): New constant.
(C_Socketpair): New routine.
* libgnat/g-socthi__mingw.adb, libgnat/g-socthi__vxworks.adb
(C_Socketpair): Is separated in anouther file.
* libgnat/g-sthcso.adb (C_Socketpair): Non UNIX implementation.
* libgnat/g-stsifd__sockets.adb: Reuse C_Socketpair.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275951 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/libgnat/g-socket.adb
gcc/ada/libgnat/g-socket.ads
gcc/ada/libgnat/g-socthi.ads
gcc/ada/libgnat/g-socthi__mingw.adb
gcc/ada/libgnat/g-socthi__mingw.ads
gcc/ada/libgnat/g-socthi__vxworks.adb
gcc/ada/libgnat/g-socthi__vxworks.ads
gcc/ada/libgnat/g-sthcso.adb [new file with mode: 0644]
gcc/ada/libgnat/g-stsifd__sockets.adb