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;
and then R /= Failure
then
-- A socket inherits the properties ot 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;
Disable_SIGPIPE (R);
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 --
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;
Disable_SIGPIPE (R);