Re: Problems with Backhand on Compaq DS10L (alpha) w/ Redhat 7.2

Leonardo Herrera <[email protected]> Thu, 03 Jul 2003 12:47:39 -0400
Newsgroups gmane.comp.apache.mod-backhand.general
Message-ID <[email protected]>
Theo E. Schlossnagle wrote:
> Yes... alpha has an 8 byte time_t.  intel has 4 bytes.  However, there 
> is an 8 byte padding in the structure... it must be an alignment issue.  
> I have a Linux Alpha box sitting around here somewhere, if you don't 
> puzzle it out before me, then I'll figure it out.
> 
> Essentially, what we sould do is make sure that all the internal 
> elements of that structure are aligned on an 8 byte boundary.  There is 
> some clever compiler directive to do that, but it escapes me now.

Ok, I played a bit with the code. I cloned the serverstat struct and 
added the __attribute__ ((__packed__)) directive. Unsurprisingly, the 
results on the intel machine did not changed. In the alpha machine, 
sizeof(serverstat) decreased from 112 bytes (unaligned) to 108 bytes 
(aligned.) It's needed to deal with the extra 4 bytes from time_t?

Anyways, I'm going to try with just this change.

Regards,
-- 
Leonardo Herrera
mailto:[email protected]