/* Assume BSD has a working sys/queue.h and kqueue(2) interface. */
#define HAVE_SYS_QUEUE_H
#define HAVE_KQUEUE
+#define WARN_SELECT
#elif defined(__linux__) || defined(__sun)
/* Assume Linux and Solaris have a working epoll(3) interface. */
#define HAVE_EPOLL
+#define WARN_SELECT
#else
/* pselect(2) is a POSIX standard. */
#define HAVE_PSELECT
+#define WARN_SELECT
#endif
#endif
#include <poll.h>
#endif
+#ifdef WARN_SELECT
+#if defined(HAVE_KQUEUE)
+#pragma message("Compiling eloop with kqueue(2) support.")
+#elif defined(HAVE_EPOLL)
+#pragma message("Compiling eloop with epoll(7) support.")
+#elif defined(HAVE_PSELECT)
+#pragma message("Compiling eloop with pselect(2) support.")
+#elif defined(HAVE_PPOLL)
+#pragma message("Compiling eloop with ppoll(2) support.")
+#elif defined(HAVE_POLLTS)
+#pragma message("Compiling eloop with pollts(2) support.")
+#else
+#error Unknown select mechanism for eloop
+#endif
+#endif
+
/* Our structures require TAILQ macros, which really every libc should
* ship as they are useful beyond belief.
* Sadly some libc's don't have sys/queue.h and some that do don't have
* `HAVE_PPOLL`
kqueue(2) is found on modern BSD kernels.
-epoll(2) is found on modern Linux and Solaris kernels.
+epoll(7) is found on modern Linux and Solaris kernels.
These two *should* be the best performers.
pselect(2) *should* be found on any POSIX libc.