AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system time unsetenv vsyslog writev],
+AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system time unsetenv usleep vsyslog writev],
[], [], [#include "have.h"]
)
AC_FUNC_MALLOC
}
#endif
-#ifdef HAVE_MINGW
+#ifndef HAVE_USLEEP
int usleep(long usec) {
- Sleep(usec / 1000);
+ struct timeval tv = {usec / 1000000, (usec / 1000) % 1000};
+ select(0, NULL, NULL, NULL, &tv);
return 0;
}
#endif
extern int gettimeofday(struct timeval *, void *);
#endif
+#ifndef HAVE_USLEEP
+extern int usleep(long);
+#endif
+
#endif /* __DROPIN_H__ */