Re: time_t size: The year 2038 bug?

From: Johan Kullstam (kullstam@ne.mediaone.net)
Date: Thu Jan 06 2000 - 20:53:23 EST


Thierry Vignaud <tvignaud@mandrakesoft.com> writes:

> Jesse Pollard a écrit :
> >
> > Johan Kullstam" <kullstam@ne.mediaone.net>
> > >i'd also like to see C types with *specified* bit widths, e.g.,
> > >int16, int32, uint8 &c. then you could write more portable code when
> > >you really need a certain number of bits like for CRC algorithms.
>
> ever head of inttypes.h ???

consider a 64 bit processor where you'd like to have 64 bit integers.
use the following:

type bits
char 8
short int 16
int 64
long int 64
long long 128

ok now that we have no 32 bit integer quantity, please get me a 32 bit
integer using a #define macro.

therefore, we are forced to do

type bits
char 8
short int 16
int 32 (or 16)
long int 64 (or 32)
long long 128 (or 64)

in order to cover 8, 16 and 32. there is no way to have a 64 bit int
and cover all the smaller integers. you run out of types.

and how does inttypes.h help me on a pdp-10 with 36 bit integers?

-- 
J o h a n  K u l l s t a m
[kullstam@ne.mediaone.net]
Don't Fear the Penguin!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:08 EST