Re: sizeof(struct timeval)

2006-03-15 Thread [EMAIL PROTECTED]
Nick Kew wrote: > Tony Houghton wrote: >... > But regardless of whether it's 'safe' amongst current devices, > you're setting yourself up for a Y2K-family bug. Except it'll > be a real one, not a storm-inna-teacup. > Hey, hey, don't go spouting off like one of those ignorant journalists! I and a

Re: sizeof(struct timeval)

2006-03-14 Thread Giovanni Bajo
Tony Houghton wrote: > I'm writing a python program which reads input device events so it > needs to know sizeof(struct timeval). By using the struct module I > should be able to work out sizeof(long) from python, but I can't > think of a way to measure non-fundamental types without including a >

Re: sizeof(struct timeval)

2006-03-14 Thread Nick Kew
Tony Houghton wrote: > I'm writing a python program which reads input device events so it needs > to know sizeof(struct timeval). By using the struct module I should be > able to work out sizeof(long) from python, but I can't think of a way to > measure non-fundamental types without including a lit

Re: sizeof(struct timeval)

2006-03-13 Thread David Bolt
On Tue, 14 Mar 2006, Tony Houghton <[EMAIL PROTECTED]> wrote:- >In any case, it does imply that timeval can be relied on to be 2 * >32-bits (2 * long) in 32-bit architectures and something else in 64-bit >architectures - where long is 64-bit. Using the source below for a quick test on both a 32

Re: sizeof(struct timeval)

2006-03-13 Thread Tony Houghton
In <[EMAIL PROTECTED]>, Big and Blue <[EMAIL PROTECTED]> 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 wa

Re: sizeof(struct timeval)

2006-03-13 Thread Tony Houghton
In <[EMAIL PROTECTED]>, Big and Blue <[EMAIL PROTECTED]> 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, yes

Re: sizeof(struct timeval)

2006-03-13 Thread Big and Blue
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. Howev

Re: sizeof(struct timeval)

2006-03-13 Thread Big and Blue
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. I do know that the size of a struct u