diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-08 12:59:28 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-08 12:59:28 +0000 |
commit | e5772b53b217e844294503da040ec9e2fb7374af (patch) | |
tree | 79ae6ee89c9399d148f4fe0f6a12ce13f41573e1 /gcc/ada/g-socthi.adb | |
parent | 9b48614b5a736a3d809ad9af38e3f842031b105a (diff) | |
download | gcc-e5772b53b217e844294503da040ec9e2fb7374af.tar.gz |
2008-08-08 Thomas Quinot <quinot@adacore.com>
* g-soccon.ads: New file.
* g-stheme.adb, g-socthi-vms.adb, g-socthi-vxworks.adb,
g-socthi-mingw.adb, g-sttsne-vxworks.adb, g-socthi.adb,
g-stsifd-sockets.adb, g-socket.adb, g-socket.ads,
g-sothco.adb, g-sothco.ads: Add back GNAT.Sockets.Constants as a child
unit, to allow building software that depends on this internal unit
with both older and newer compilers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138877 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socthi.adb')
-rw-r--r-- | gcc/ada/g-socthi.adb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/gcc/ada/g-socthi.adb b/gcc/ada/g-socthi.adb index cc90c640a04..57b76bc2fe0 100644 --- a/gcc/ada/g-socthi.adb +++ b/gcc/ada/g-socthi.adb @@ -56,7 +56,7 @@ package body GNAT.Sockets.Thin is -- been set in non-blocking mode by the user. Quantum : constant Duration := 0.2; - -- When Constants.Thread_Blocking_IO is False, we set sockets in + -- When SOSC.Thread_Blocking_IO is False, we set sockets in -- non-blocking mode and we spend a period of time Quantum between -- two attempts on a blocking operation. @@ -150,14 +150,14 @@ package body GNAT.Sockets.Thin is begin loop R := Syscall_Accept (S, Addr, Addrlen); - exit when Constants.Thread_Blocking_IO + exit when SOSC.Thread_Blocking_IO or else R /= Failure or else Non_Blocking_Socket (S) - or else Errno /= Constants.EWOULDBLOCK; + or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; - if not Constants.Thread_Blocking_IO + if not SOSC.Thread_Blocking_IO and then R /= Failure then -- A socket inherits the properties ot its server especially @@ -165,7 +165,7 @@ package body GNAT.Sockets.Thin is -- tracks sockets set in non-blocking mode by user. Set_Non_Blocking_Socket (R, Non_Blocking_Socket (S)); - Discard := Syscall_Ioctl (R, Constants.FIONBIO, Val'Unchecked_Access); + Discard := Syscall_Ioctl (R, SOSC.FIONBIO, Val'Unchecked_Access); end if; Disable_SIGPIPE (R); @@ -186,10 +186,10 @@ package body GNAT.Sockets.Thin is begin Res := Syscall_Connect (S, Name, Namelen); - if Constants.Thread_Blocking_IO + if SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) - or else Errno /= Constants.EINPROGRESS + or else Errno /= SOSC.EINPROGRESS then return Res; end if; @@ -226,7 +226,7 @@ package body GNAT.Sockets.Thin is Res := Syscall_Connect (S, Name, Namelen); if Res = Failure - and then Errno = Constants.EISCONN + and then Errno = SOSC.EISCONN then return Thin_Common.Success; else @@ -244,8 +244,8 @@ package body GNAT.Sockets.Thin is Arg : Int_Access) return C.int is begin - if not Constants.Thread_Blocking_IO - and then Req = Constants.FIONBIO + if not SOSC.Thread_Blocking_IO + and then Req = SOSC.FIONBIO then if Arg.all /= 0 then Set_Non_Blocking_Socket (S, True); @@ -270,10 +270,10 @@ package body GNAT.Sockets.Thin is begin loop Res := Syscall_Recv (S, Msg, Len, Flags); - exit when Constants.Thread_Blocking_IO + exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) - or else Errno /= Constants.EWOULDBLOCK; + or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; @@ -297,10 +297,10 @@ package body GNAT.Sockets.Thin is begin loop Res := Syscall_Recvfrom (S, Msg, Len, Flags, From, Fromlen); - exit when Constants.Thread_Blocking_IO + exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) - or else Errno /= Constants.EWOULDBLOCK; + or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; @@ -322,10 +322,10 @@ package body GNAT.Sockets.Thin is begin loop Res := Syscall_Send (S, Msg, Len, Flags); - exit when Constants.Thread_Blocking_IO + exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) - or else Errno /= Constants.EWOULDBLOCK; + or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; @@ -349,10 +349,10 @@ package body GNAT.Sockets.Thin is begin loop Res := Syscall_Sendto (S, Msg, Len, Flags, To, Tolen); - exit when Constants.Thread_Blocking_IO + exit when SOSC.Thread_Blocking_IO or else Res /= Failure or else Non_Blocking_Socket (S) - or else Errno /= Constants.EWOULDBLOCK; + or else Errno /= SOSC.EWOULDBLOCK; delay Quantum; end loop; @@ -377,13 +377,13 @@ package body GNAT.Sockets.Thin is begin R := Syscall_Socket (Domain, Typ, Protocol); - if not Constants.Thread_Blocking_IO + if not SOSC.Thread_Blocking_IO and then R /= Failure then -- Do not use C_Ioctl as this subprogram tracks sockets set -- in non-blocking mode by user. - Discard := Syscall_Ioctl (R, Constants.FIONBIO, Val'Unchecked_Access); + Discard := Syscall_Ioctl (R, SOSC.FIONBIO, Val'Unchecked_Access); Set_Non_Blocking_Socket (R, False); end if; Disable_SIGPIPE (R); |