bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FD_ISSET replacement


From: Paolo Bonzini
Subject: Re: FD_ISSET replacement
Date: Thu, 23 Oct 2008 12:17:53 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

>>  /* Re-define FD_ISSET to avoid a WSA call while we are not using
>>     network sockets.  */
> 
> This comments means IMO that when someone is using select() on pipes and
> console handles, he should not make ws2_32 calls.

That, and I was worried that it didn't work unless WSAStartup/WSACleanup
was called (and I didn't have means to check at the time).

>>  static inline int
>> -rpl_fd_isset (int fd, fd_set * set)
>> +rpl_fd_isset (SOCKET fd, fd_set * set)
>>  {
>> -  int i;
>> +  u_int i;
>>    if (set == NULL)
>>      return 0;
> 
> I agree with the signature change, because this FD_ISSET replacement is
> called by winsock-select.c.

It is also meant to be called by the user, though.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]