struct timeval: why is tv_sec long?

Joerg Sonnenberger joerg at britannica.bec.de
Sat Oct 8 09:26:13 PDT 2005


On Sat, Oct 08, 2005 at 06:54:22AM +1000, Peter Jeremy wrote:
> On Fri, 2005-Oct-07 20:17:43 +0200, Andreas Kohn wrote:
> >As SUSv2 wants tv_sec to be time_t[1], would it be possible to change
> >this to time_t on all but alpha? I guess alpha will not receive a switch
> >to long anymore[2]. 
> 
> tv_sec and time_t are int on Alpha for compatability with Tru64.  Since
> the Alpha is now a dead architecture and no longer a tier-1 FreeBSD
> platform, it's unlikely anyone will expend the effort to change them.

If that is the only reason, make it use time_t and add a fake field on
Alpha before or after it (not sure of the byte order) to keep the alignment.

Joerg


More information about the freebsd-hackers mailing list