FD_ZERO(&fds);
FD_SET(fd, &fds);
-#ifdef _WIN32_WCE
- // NB: This fixes a broken Winsock2 select() behaviour. select()
- // never returns for non-blocking sockets, unless they're already
- // ready to be written to...
- u_long zero = 0; ioctlsocket(fd, FIONBIO, &zero);
-#endif
n = select(fd+1, 0, &fds, 0, tvp);
-#ifdef _WIN32_WCE
- u_long one = 0; ioctlsocket(fd, FIONBIO, &one);
-#endif
} while (n < 0 && errno == EINTR);
if (n < 0) throw SystemException("select",errno);
if (!m_file) return;
}
-#ifndef _WIN32_WCE
time_t current = time(0);
if (current != m_lastLogTime) {
m_lastLogTime = current;
fprintf(m_file, "\n%s", ctime(&m_lastLogTime));
}
-#endif
fprintf(m_file," %s:", logname);
int column = strlen(logname) + 2;