apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Duigou <apr-...@duigou.org>
Subject Re: apr_uint8_t and apr_int8_t?
Date Wed, 28 Jun 2006 16:39:15 GMT
I'm motivated to ask to this for wire protocols which are defined with 
specific bit sizes. char and unsigned char are not defined to be 
*exactly* 8 bits and are apparently not 8 bits in some esoteric 
environments.

The C standard 5.2.4.2.1 requires that char and unsigned char be *at 
least* 8 bits but does not fix a value. So assuming that UCHAR_MAX is 
255 is just as unwise as assuming that UINT_MAX is 65535 or 4294967295.

This request is also partially for completeness with the other bit sized 
scalar typedefs.

Mike

William A. Rowe, Jr. wrote:
> Can you give us any example where signed char, unsigned char don't
> fit the bill?
> 
> Bill
> 
> Mike Duigou wrote:
>> Hi!
>>
>> Would it be possible to add definitions for apr_uint8_t and apr_int8_t 
>> to apr.h? This appears to have been previously requested in 2001 
>> (http://mail-archives.apache.org/mod_mbox/apr-dev/200105.mbox/%3CJLEGKKNELMHCJPNMOKHOGELPDOAA.striker@samba-tng.org%3E)

>> but I don't see any response indicating why the change was never made.
>>
>> Mike
>>
>> .
>>
> 
> 
> 


Mime
View raw message