Re: [PATCH v2 13/14] daemon: use select() instead of poll()
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- Jan 16, 2010, 11:05 UTC
- Message-ID
- <40aa078e1001160305y17b46a6dtc4959e5255c7acae@mail.gmail.com>
- In-Reply-To
- <201001161138.36535.j6t@kdbg.org>
On Sat, Jan 16, 2010 at 11:38 AM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 26 quoted lines
> On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
>> On Sat, Jan 16, 2010 at 9:06 AM, Johannes Sixt <j6t@kdbg.org> wrote:
>> > On Samstag, 16. Januar 2010, Erik Faye-Lund wrote:
>> >> +static inline void mingw_fd_set(int fd, fd_set *set)
>> >> +{
>> >> + FD_SET(_get_osfhandle(fd), set);
>> >> +}
>> >> #undef FD_SET
>> >> +#define FD_SET(a,b) mingw_fd_set(a,b)
>> >> +
>> >> #undef FD_ISSET
>> >> #define FD_ISSET(fd, set) __WSAFDIsSet(_get_osfhandle(fd), (fd_set
>> >> *)(set))
>> >
>> > Ah, yes, how obvious ;) You are going to do the same with FD_ISSET as
>> > well, aren't you?
>>
>> Do I really need to? There's already a single function for that, with
>> no "ugly hidden internals" there; __WSAFDIsSet() is documented in
>> MSDN. I mean, Sure... I could... I just don't see the point.
>
> __WSAFDIsSet is "ugly hidden internals" and we should not rely on it when we
> can use the official FD_ISSET for our own FD_ISSET.
>
> -- Hannes
>...but __WSAFDIsSet() seems to be every bit as official on Windows as FD_ISSET() (documented in msdn, without any notes not to use it), so I still don't really see the point.
However, I don't personally care one way or the other, so just doing it is probably less work than convincing you that I don't have to ;)
-- Erik "kusma" Faye-Lund