cygwin-1.5 + cygwin-1.7

Reini Urban rurban at x-ray.at
Tue Dec 16 10:02:14 CET 2008


Just a short notice:

cygwin-1.5.x does not compile OOTB with varnish-2.0.2, because of a missing
clock_gettime(CLOCK_MONOTONIC, ...) definition.
That means HAVE_CLOCK_GETTIME is set, but CLOCK_MONOTONIC is missing in 1.5.x,
but is defined in the upcoming 1.7 cygwin release.
I haven't tried cygwin-1.5.x with HAVE_CLOCK_GETTIME undefined yet,
though it should work.

cygwin-1.7 /usr/include/time.h also has this:

#if defined(_POSIX_MONOTONIC_CLOCK)
/*  The identifier for the system-wide monotonic clock, which is defined
 *      as a clock whose value cannot be set via clock_settime() and which
 *          cannot have backward clock jumps. */
#define CLOCK_MONOTONIC (clockid_t)4
#endif

Interestingly _POSIX_MONOTONIC_CLOCK is not set per default, so I
added it manually.
All this should probably be settled in autotools, and not here.
But varnish then needs a tighter check for _POSIX_MONOTONIC_CLOCK in
libvarnish/time.c

I'll keep you posted if this MacOSX warning applies to cygwin also,
and compat has to be used.

 "Fix build on MacOS X: add a fake clock_gettime() and fix some includes.

 WARNING: varnish will build and run, but the lack of a monotonic clock
 may lead to strange behaviour if the clock is stepped (rather than skewed)
 while varnish is running."
http://projects.linpro.no/pipermail/varnish-commit/2006-October/001257.html
-- 
Reini Urban



More information about the varnish-dev mailing list