sizeof(struct timeval)

Tony Houghton at
Tue Mar 14 02:56:25 CET 2006

In <cuqdnbf1lLdLgovZRVnyhA at>,
Big and Blue <No_4 at> wrote:

> Big and Blue wrote:
> > Tony Houghton wrote:
> >>
> >> How safe would I be assuming that
> >>     sizeof(struct timeval) == 2 * sizeof(long)
> >>
> >> is always true on Linux on different architectures?
> >
> >    Based on what I was looking at today (well, yesterday now), you might
> > be wrong.
>     However, it looks as though I was wrong:

[Snip headers showing my assumption is correct for his PC too]

I've already looked at those headers too. But most of the definitions
look like internal types and I'm not confident I can rely on them
staying the same size. But I don't think there's a strong enough case
for changing them to justify the glibc ABI change etc, so I'm probably

The address in the Reply-To is genuine and should not be edited.
See <> for more reliable contact addresses.

More information about the Python-list mailing list