so we need to hack around it when not there
/* Define if you have the `setvbuf' function. */
#undef HAVE_SETVBUF
+
+/* Define if you have the `poll' function. */
+#undef HAVE_POLL
+
static void go_sleep(long ms)
{
+#ifdef HAVE_POLL
/* portable subsecond "sleep" */
poll((void *)0, 0, ms);
+#else
+ /* systems without poll() need other solutions */
+
+#ifdef WIN32
+ /* Windows offers a millisecond sleep */
+ Sleep(ms);
+#else
+ /* Other systems must use select() for this */
+ struct timeval timeout;
+
+ timeout.tv_sec = 0;
+ timeout.tv_usec = ms * 1000;
+
+ select(0, NULL, NULL, NULL, &timeout);
+#endif
+
+#endif
}
struct OutStruct {