diff options
| author | root <root> | 2007-11-17 05:26:09 +0000 | 
|---|---|---|
| committer | root <root> | 2007-11-17 05:26:09 +0000 | 
| commit | c2e069c80086a655611b636be4465141548393fc (patch) | |
| tree | bb3c005758b1a33c4855bc4596efc215d0b6ab7f | |
| parent | 3afd3cb9621ee33f64911951a1a9a8f0a42acf29 (diff) | |
*** empty log message ***
| -rw-r--r-- | README.embed | 13 | ||||
| -rw-r--r-- | ev_win32.c | 7 | 
2 files changed, 14 insertions, 6 deletions
diff --git a/README.embed b/README.embed index a7e03ca..b80a23a 100644 --- a/README.embed +++ b/README.embed @@ -121,12 +121,13 @@ PREPROCESSOR SYMBOLS      EV_SELECT_IS_WINSOCKET -       When defined to 1, the select backend will assume that select -       doesn't understand file descriptors but wants osf handles on -       win32 (this is the case when the select to be used is the winsock -       select). This means that it will call _get_osfhandle on the fd to -       convert it to an OS handle. Should not be defined on non-win32 -       platforms. +       When defined to 1, the select backend will assume that +       select/socket/connect etc. don't understand file descriptors but +       wants osf handles on win32 (this is the case when the select to +       be used is the winsock select). This means that it will call +       _get_osfhandle on the fd to convert it to an OS handle. Otherwise, +       it is assumed that all these functions actually work on fds, even +       on win32. Should not be defined on non-win32 platforms.      EV_USE_POLL @@ -73,8 +73,15 @@ ev_pipe (int filedes [2])    closesocket (listener); +#if EV_SELECT_IS_WINSOCKET +  filedes [0] = _open_osfhandle (sock [0], 0); +  filedes [1] = _open_osfhandle (sock [1], 0); +#else +  /* when select isn't winsocket, we also expect socket, connect, accept etc. +   * to work on fds */    filedes [0] = sock [0];    filedes [1] = sock [1]; +#endif    return 0;  | 
