Exceptfds : access Fd_Set;
Timeout : Timeval_Access) return C.int
is
- pragma Warnings (Off, Exceptfds);
-
- Original_WFS : aliased constant Fd_Set := Writefds.all;
-
- Res : C.int;
- S : aliased C.int;
- Last : aliased C.int;
+ Original_WFS : aliased Fd_Set;
+ Res : C.int;
+ S : aliased C.int;
+ Last : aliased C.int;
begin
-- Asynchronous connection failures are notified in the exception fd
-- present in the initial write fd set, then move the socket from the
-- exception fd set to the write fd set.
- if Writefds /= No_Fd_Set_Access then
+ if Writefds /= null then
+ Original_WFS := Writefds.all;
-- Add any socket present in write fd set into exception fd set
Res := Standard_Select (Nfds, Readfds, Writefds, Exceptfds, Timeout);
- if Exceptfds /= No_Fd_Set_Access then
+ if Exceptfds /= null then
declare
EFSC : aliased Fd_Set := Exceptfds.all;
Flag : constant C.int := SOSC.MSG_PEEK + SOSC.MSG_OOB;
-- exception fd set back to write fd set. Otherwise, ignore
-- this event since the user is not watching for it.
- if Writefds /= No_Fd_Set_Access
- and then (Is_Socket_In_Set (Original_WFS'Access, S) /= 0)
+ if Writefds /= null
+ and then Is_Socket_In_Set (Original_WFS'Access, S) /= 0
then
Insert_Socket_In_Set (Writefds, S);
end if;
end loop;
end;
end if;
+
return Res;
end C_Select;