How big is time_t? Alignment?

Eric S. Raymond esr at thyrsus.com
Fri May 13 10:49:18 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> Are we interested in any systems with 32 bit time_t?
> Do all the systems we are interested in put 64 bit things on 8 byte 
> boundaries?

All the systems we are interested in use self-alignment rules, so yes to
the second question.

If you want full details on how to compute alignment and packing, see
http://www.catb.org/esr/structure-packing . The Linux/GCC combination
has one odd exception to self-alignent near floats the isn't relevant here.
There are some tricky details about trailing padding on struct members.

We might be interested in supporting some 32-bit embedded systems.  As long
as both sides of the SHM exchage were compiled 32-bit I don't expect this to
be a problem.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list