fixed more code for watt-32

This commit is contained in:
2014-10-20 04:58:15 +00:00
parent 552bb7cc20
commit 5e94b7d9b2
7 changed files with 206 additions and 41 deletions

View File

@ -75,6 +75,7 @@
# include <errno.h>
# include <tcp.h> /* watt-32 */
# include <sys/ioctl.h> /* watt-32 */
# define select select_s /* TODO: is this correct? */
# undef AF_UNIX
@ -791,6 +792,16 @@ static int set_socket_nonblock (qse_httpd_t* httpd, qse_sck_hnd_t fd, int enable
}
return 0;
#elif defined(__DOS__)
if (ioctlsocket (fd, FIONBIO, (char*)&enabled) == SOCKET_ERROR)
{
qse_httpd_seterrnum (httpd, SKERR_TO_ERRNUM());
return -1;
}
return 0;
#elif defined(O_NONBLOCK)
int flag = fcntl (fd, F_GETFL);
@ -970,7 +981,6 @@ qse_fprintf (QSE_STDERR, QSE_T("Failed to enable SO_REUSEPORT\n"));
setsockopt (fd, SOL_IP, IP_TRANSPARENT, &flag, QSE_SIZEOF(flag));
#endif
if (server->dope.flags & QSE_HTTPD_SERVER_BINDTONWIF)
{
#if defined(SO_BINDTODEVICE)