Bruno Haible wrote: > Yoann Vandoorselaere wrote: >> r = recv (pfd[i].fd, data, sizeof (data), MSG_PEEK); >> + >> +# ifdef WIN32 >> + if (r < 0 && GetLastError() == 10057) /* server socket */ >> + socket_errno = ENOTCONN; >> + else >> +# endif > > I thought that after using a winsock function, you need to check > WSAGetLastError() and not GetLastError()? [1] > > Also, is there no symbolic, self-explanatory name instead of 10057?
It is temporary anyway; Yoann seems to be the main user of poll on Win32 and if he helps testing the native implementation, it will get in sooner. Paolo