[freetds] always poll, even without poll(2)

James K. Lowden jklowden at freetds.org
Tue Dec 30 01:34:57 EST 2008


Frediano Ziglio wrote:
> What do you think about
... 
> +#if defined(WIN32)
> +               /* Win32 cares about the number of descriptors, not the
> highest one. */ +               ++maxfd;
> +#else
>                 if (p->fd > maxfd)
>                         maxfd = p->fd;
> +#endif

It's a very close call.  Your way is slightly more efficient (probably)
and mine relies a little less on the preprocessor.  But yours might be a
little clearer, finally, because maxfd isn't calculated one way first and
later overridden.  Feel free to change it if you like.  

Regards, 

--jkl


More information about the FreeTDS mailing list