lkml.org 
[lkml]   [2000]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: time_t size: The year 2038 bug?
>>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 ???

yes. It cannot define anything greater than the already defined limits.
And even then it is limited to 64 bits on a 64 bit system (unless the
compiler is non-standard - ie "long long" type of thing).

I specified no limits on the definition of integer type ie.:

int ipv6addr :128; /* 128 bits, integer */

The operators would be the same, the number of bits in the integer object
is selectable at compile time. Using this definition allows

typedef int int64_t : 64;

as a standard definition. NOT

typedef long long int64_t;

which is not ANSI. The syntax is the same as for a bit field, just not
limited to a maximum size of int (whether an int is 16, 32, or 64 bits is
up to the compiler).

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.027 / U:3.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site