On Sun, Aug 18, 2013 at 05:19:30PM +0200, Matthias Kilian wrote:
> > + instance Storable CTimeval where
> > +-  sizeOf _ = (sizeOf (undefined :: CLong)) * 2
> > ++  sizeOf _ = sizeOf (undefined :: TimeT) + sizeOf (undefined :: 
> > SusecondsT)
> > +   alignment _ = alignment (undefined :: CLong)
> 
> Is that the correct alignment?

I forgot to mention that there also are some access functions called
a little bit down the above chunk (like pokeByteOff, which is
stupidly named, because it may read more than one byte) called with
offsets like `sizeOf (undefined :: TimeT)`, assuming that there's
no gap between tv_sec and tv_usec in struct timeval. True for
OpenBSD, but, well, the upstream diff also tries to deal with cases
where tv_sec is an int (for whatever reason).

> I'd prefer to run some tests on amd64 and i386 before this goes in
> (unless someone beats me doing tests).

Someone *has* to beat me; I'm all busy with tidying up and renovating
my appartment. This may render me quasi-offline for a week or two.

Ciao,
        Kili

Reply via email to