version 1.10 | | version 1.11 |
---|
| | |
| | |
/* | | /* |
* static char *rcsid_loop_c = | | * static char *rcsid_loop_c = |
* "$Id: loop.c,v 1.10 2001/04/06 00:43:26 michtoen Exp $"; | | * "$Id: loop.c,v 1.11 2001/04/06 19:08:03 michtoen Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#include <sockproto.h> | | #include <sockproto.h> |
#endif | | #endif |
| | |
#ifndef WIN32 // ---win32 exclude unix headers | | #ifndef WIN32 /* ---win32 exclude unix headers */ |
#include <sys/types.h> | | #include <sys/types.h> |
#include <sys/time.h> | | #include <sys/time.h> |
#include <sys/socket.h> | | #include <sys/socket.h> |
#include <netinet/in.h> | | #include <netinet/in.h> |
#include <netdb.h> | | #include <netdb.h> |
#endif // end win32 | | #endif /* end win32 */ |
| | |
#ifdef HAVE_UNISTD_H | | #ifdef HAVE_UNISTD_H |
#include <unistd.h> | | #include <unistd.h> |
| | |
* or no more characters to read. | | * or no more characters to read. |
*/ | | */ |
do { | | do { |
#ifdef WIN32 // ***win32: change oldsocket read() to recv() | | #ifdef WIN32 /* ***win32: change oldsocket read() to recv() */ |
stat = recv(ns->fd, ns->inbuf.buf + ns->inbuf.len, 1,0); | | stat = recv(ns->fd, ns->inbuf.buf + ns->inbuf.len, 1,0); |
| | |
if (stat==-1 && WSAGetLastError() !=WSAEWOULDBLOCK) { | | if (stat==-1 && WSAGetLastError() !=WSAEWOULDBLOCK) { |