]> sjero.net Git - wget/commitdiff
[svn] Use Windows timers under Cygwin.
authorhniksic <devnull@localhost>
Fri, 8 Apr 2005 22:05:45 +0000 (15:05 -0700)
committerhniksic <devnull@localhost>
Fri, 8 Apr 2005 22:05:45 +0000 (15:05 -0700)
src/ChangeLog
src/ptimer.c

index aece8bee4397f3115b60426b069f4bfe933cdaa2..0ae52593d466784900609ee035b5d2705e421f78 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 472e74ba395064e4b659161f3c0e295944886e1a..33ca728eb8d3bcdd6c75c42cdbd0b88e4cbf7da9 100644 (file)
@@ -66,6 +66,13 @@ so, delete this exception statement from your version.  */
 #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"
 
@@ -82,7 +89,7 @@ extern int errno;
 #undef PTIMER_TIME
 #undef PTIMER_WINDOWS
 
-#ifdef WINDOWS
+#if defined(WINDOWS) || defined(__CYGWIN__)
 # define PTIMER_WINDOWS                /* use Windows timers */
 #else
 # if _POSIX_TIMERS > 0