On Thu, Nov 12, 2015 at 06:35:04PM +0300, Vladimir Ivannikov 
<[email protected]> wrote:
> AFAICT code in question is resides in ev_win32.c under ifdef _WIN32, which
> makes it strictly win32-specific.

I guess it depends on what you mean with "strictly", then it's either correct
or not :)

Regardless, as I wrote before, not all accept implementations in use in
win32 environments (strict or not) return handles, and this is fully
supported by ev_win32.c

> And even if it didn't, accept() returns not any negative value on error, but
> -1 which is also happens to be INVALID_SOCKET value as well (which is also
> win32-specific define, but usually emulated via something like
> #define INVALID_SOCKET (-1)
> on other platforms)

The code really is just about the win32 platform in general, and I
think its much better not to assume specific hardcoded values for such
constants, even if they are pretty stable on win32.

Since the code works correct as it stands, the conservative solution would
be not to change it, and probably to remove the check altogether in a
future version, or split it into two.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/libev

Reply via email to