>>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/
This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:06 EST