Commit f3ab0c90 authored by Martti Mela's avatar Martti Mela

added several HAVE_SELECTs

darcs-hash:20070206154643-1b897-7f230d462a4524aa733686bf0b3b612576ac746f.gz
parent 3b43fe09
......@@ -35,7 +35,7 @@
#include "config.h"
#if HAVE_POLL || HAVE_WIN32
#if HAVE_POLL || HAVE_SELECT
#include <stdlib.h>
#include <assert.h>
......@@ -679,4 +679,4 @@ int su_poll_clone_start(su_root_t *parent,
parent, return_clone, magic, init, deinit);
}
#endif /* HAVE_POLL */
#endif /* HAVE_POLL || HAVE_SELECT */
......@@ -149,7 +149,7 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events)
*newwait = h;
#elif SU_HAVE_POLL
#elif SU_HAVE_POLL || HAVE_SELECT
int mode;
if (newwait == NULL || events == 0 || socket == INVALID_SOCKET) {
......@@ -187,7 +187,7 @@ int su_wait_destroy(su_wait_t *waitobj)
su_wait_t w0 = NULL;
if (*waitobj)
WSACloseEvent(*waitobj);
#elif SU_HAVE_POLL
#elif SU_HAVE_POLL || HAVE_SELECT
su_wait_t w0 = { INVALID_SOCKET, 0, 0 };
#else
su_wait_t w0 = { INVALID_SOCKET, 0, 0 };
......@@ -233,7 +233,7 @@ int su_wait(su_wait_t waits[], unsigned n, su_duration_t timeout)
else
return i;
#elif SU_HAVE_POLL
#elif SU_HAVE_POLL || HAVE_SELECT
for (;;) {
int i = poll(waits, n, timeout);
......@@ -275,7 +275,7 @@ int su_wait_events(su_wait_t *waitobj, su_socket_t s)
return net_events.lNetworkEvents;
#elif SU_HAVE_POLL
#elif SU_HAVE_POLL || HAVE_SELECT
/* poll(e, 1, 0); */
return waitobj->revents;
#endif
......@@ -304,7 +304,7 @@ int su_wait_mask(su_wait_t *waitobj, su_socket_t s, int events)
WSASetLastError(error);
return -1;
}
#elif SU_HAVE_POLL
#elif SU_HAVE_POLL || HAVE_SELECT
waitobj->fd = s;
waitobj->events = events;
waitobj->revents = 0;
......
......@@ -456,6 +456,8 @@ RETSIGTYPE term(int n)
exit(1);
}
#else
static char const no_alarm[] = "";
#endif
......
......@@ -124,7 +124,7 @@ static int callback(su_root_magic_t *magic,
magic->wakeups[i]++;
#if HAVE_POLL
#if HAVE_POLL || HAVE_SELECT
if (w->fd != magic->sockets[i])
return ++magic->error;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment