[Asterisk-Dev] Re: ast_localtime() weird interface.

Luigi Rizzo rizzo at icir.org
Wed Oct 12 07:42:05 MST 2005


On Wed, Oct 12, 2005 at 09:15:53AM -0500, Tilghman Lesher wrote:
> On Wednesday 12 October 2005 03:17, Luigi Rizzo wrote:
...
> > > What kind of problems are you encountering in dealing with the
> > > different definitions of time_t?
> >
> > the problem is that depending on the platform, time_t is
> > some variant of integer types, and a zillion places in say.c
> > calls ast_localtime() using &foo.tv_sec as a first argument
> > where foo is of type struct timeval.
> >
> > The two types happen to differ on FreeBSD-6, as may be the case on
> > many other OS where system headers try to adapt to 64-bit
> > values for some types but one reason or another struct timeval and
> > time_t are not in sync.
> 
> That sounds like a call for you to fix FreeBSD.

that sounds like you are missing the point :)

"fixing" freebsd won't help with the other 34 operating system variants
where we would hope to run asterisk.
The point is, if we use different types (such as time_t and struct timeval's
tv_sec), then we cannot complain because they _really_ are different
on a given platform.

	bye
	luigi



More information about the asterisk-dev mailing list