+2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * ptimer.c: Use Windows timers under Cygwin, whose POSIX timer
+ implementation is incomplete.
+
2005-04-08 Hrvoje Niksic <hniksic@xemacs.org>
* ptimer.c (struct ptimer): Remove the unused initialized field.
#endif
#include <assert.h>
+/* Cygwin currently (as of 2005-04-08, Cygwin 1.5.14) lack clock_getres,
+ but still define _POSIX_TIMERS! Because of that we simply use the
+ Windows timers under Cygwin. */
+#ifdef __CYGWIN__
+# include <windows.h>
+#endif
+
#include "wget.h"
#include "ptimer.h"
#undef PTIMER_TIME
#undef PTIMER_WINDOWS
-#ifdef WINDOWS
+#if defined(WINDOWS) || defined(__CYGWIN__)
# define PTIMER_WINDOWS /* use Windows timers */
#else
# if _POSIX_TIMERS > 0