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.adb30
1 files changed, 11 insertions, 19 deletions
diff --git a/gcc/ada/g-socthi-vms.adb b/gcc/ada/g-socthi-vms.adb
index 6384598f07a..cb2b211d2aa 100644
--- a/gcc/ada/g-socthi-vms.adb
+++ b/gcc/ada/g-socthi-vms.adb
@@ -74,12 +74,6 @@ package body GNAT.Sockets.Thin is
Namelen : C.int) return C.int;
pragma Import (C, Syscall_Connect, "connect");
- function Syscall_Ioctl
- (S : C.int;
- Req : C.int;
- Arg : access C.int) return C.int;
- pragma Import (C, Syscall_Ioctl, "ioctl");
-
function Syscall_Recv
(S : C.int;
Msg : System.Address;
@@ -153,11 +147,11 @@ package body GNAT.Sockets.Thin is
and then R /= Failure
then
-- A socket inherits the properties of its server, especially
- -- the FIONBIO flag. Do not use C_Ioctl as this subprogram
+ -- the FIONBIO flag. Do not use Socket_Ioctl as this subprogram
-- tracks sockets set in non-blocking mode by user.
Set_Non_Blocking_Socket (R, Non_Blocking_Socket (S));
- Discard := Syscall_Ioctl (R, SOSC.FIONBIO, Val'Access);
+ Discard := C_Ioctl (R, SOSC.FIONBIO, Val'Access);
end if;
return R;
@@ -220,26 +214,24 @@ package body GNAT.Sockets.Thin is
end if;
end C_Connect;
- -------------
- -- C_Ioctl --
- -------------
+ ------------------
+ -- Socket_Ioctl --
+ ------------------
- function C_Ioctl
+ function Socket_Ioctl
(S : C.int;
Req : C.int;
Arg : access C.int) return C.int
is
begin
- if not SOSC.Thread_Blocking_IO
- and then Req = SOSC.FIONBIO
- then
+ if not SOSC.Thread_Blocking_IO and then Req = SOSC.FIONBIO then
if Arg.all /= 0 then
Set_Non_Blocking_Socket (S, True);
end if;
end if;
- return Syscall_Ioctl (S, Req, Arg);
- end C_Ioctl;
+ return C_Ioctl (S, Req, Arg);
+ end Socket_Ioctl;
------------
-- C_Recv --
@@ -405,10 +397,10 @@ package body GNAT.Sockets.Thin is
if not SOSC.Thread_Blocking_IO
and then R /= Failure
then
- -- Do not use C_Ioctl as this subprogram tracks sockets set
+ -- Do not use Socket_Ioctl as this subprogram tracks sockets set
-- in non-blocking mode by user.
- Discard := Syscall_Ioctl (R, SOSC.FIONBIO, Val'Access);
+ Discard := C_Ioctl (R, SOSC.FIONBIO, Val'Access);
Set_Non_Blocking_Socket (R, False);
end if;