r1785 - trunk/varnish-cache/lib/libvarnish

Dag-Erling Smørgrav des at linpro.no
Mon Jul 30 16:25:56 CEST 2007

"Poul-Henning Kamp" <phk at phk.freebsd.dk> writes:
> "Dag-Erling Smørgrav" <des at linpro.no> writes:
> > "Poul-Henning Kamp" <phk at phk.freebsd.dk> writes:
> > > Lack of timegm() is so bogus that it should be handled in compat IMO.
> > There is no reliable way to emulate it.
> There is, force libc to live in UTC/GMT by setting env variables etc.

First, it wouldn't be thread-safe since the environment is shared
between threads.

Second, setenv() etc. can potentially call malloc(), which is expensive.

Third, setenv() etc. can potentially leak memory.

I know the C / POSIX time-keeping API is rotten, but it's all we have.

Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no

More information about the varnish-commit mailing list