summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socthi-vms.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/g-socthi-vms.adb')
-rw-r--r--gcc/ada/g-socthi-vms.adb38
1 files changed, 4 insertions, 34 deletions
diff --git a/gcc/ada/g-socthi-vms.adb b/gcc/ada/g-socthi-vms.adb
index 389c256c1b8..8a410a44c40 100644
--- a/gcc/ada/g-socthi-vms.adb
+++ b/gcc/ada/g-socthi-vms.adb
@@ -92,13 +92,6 @@ package body GNAT.Sockets.Thin is
Fromlen : not null access C.int) return C.int;
pragma Import (C, Syscall_Recvfrom, "recvfrom");
- function Syscall_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int;
- pragma Import (C, Syscall_Send, "send");
-
function Syscall_Sendto
(S : C.int;
Msg : System.Address;
@@ -285,31 +278,6 @@ package body GNAT.Sockets.Thin is
return Res;
end C_Recvfrom;
- ------------
- -- C_Send --
- ------------
-
- function C_Send
- (S : C.int;
- Msg : System.Address;
- Len : C.int;
- Flags : C.int) return C.int
- is
- Res : C.int;
-
- begin
- loop
- Res := Syscall_Send (S, Msg, Len, Flags);
- exit when SOSC.Thread_Blocking_IO
- or else Res /= Failure
- or else Non_Blocking_Socket (S)
- or else Errno /= SOSC.EWOULDBLOCK;
- delay Quantum;
- end loop;
-
- return Res;
- end C_Send;
-
--------------
-- C_Sendto --
--------------
@@ -500,11 +468,13 @@ package body GNAT.Sockets.Thin is
begin
for J in Iovec'Range loop
- Res := C_Send
+ Res := C_Sendto
(Fd,
Iovec (J).Base.all'Address,
Interfaces.C.int (Iovec (J).Length),
- SOSC.MSG_Forced_Flags);
+ SOSC.MSG_Forced_Flags,
+ To => null,
+ Tolen => 0);
if Res < 0 then
return Res;