[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time offsets

From: Mark Ferlatte
Subject: Re: time offsets
Date: Wed, 14 Aug 2002 11:07:00 -0700
User-agent: Mutt/1.4i

begin  Christian Hopp quote on Wed, Aug 14, 2002 at 12:39:19PM +0200:
> On 13 Aug 2002, Rory Toma wrote:
> Ooops... )-: tm_gmtoff is a BSD feature.  Linux has it only if
> __USE_BSD is defined otherwise it's private.  Solaris 7/8 doesn't even
> have it and doesn't compile for me.
> Can you do a...
> ---SNIP---
>   tm_now = localtime(&now);
> #ifdef FREEBSD
>   timezone_h = -(tm_now->tm_gmtoff/3600);
>   timezone_m = abs(tm_now->tm_gmtoff/60)%60;
> #else
>   timezone_h = -(timezone/3600);
>   timezone_m = abs(timezone/60)%60;
> #endif

Maybe I missed it, but is there a reason you're not using autoconf to
test for features, instead of doing platform based tests?  ie:

        timezone-h = -(tm_now->tm_gmtoff/3600);
        timezone_h = -(timezone/3600);

I mean, that's what autoconf is there for...

If it's a matter of "We would like to, but don't have time/don't know
how", then I can submit a patch to rework autoconf support so that monit
will have a chance of Just Working (tm).


Attachment: pgpXFLh8ObY8v.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]