[cfe-dev] On sizeof char, bytes, and bits in the C99 standard

me22 me22.ca at gmail.com
Fri Jan 2 11:34:30 PST 2009


On Fri, Jan 2, 2009 at 11:47, Török Edwin <edwintorok at gmail.com> wrote:
>
> Ok, so I may assume that on any POSIX compliant platform CHAR_BITS is 8?
> (POSIX requires (u)int8_t:
> http://www.opengroup.org/onlinepubs/000095399/basedefs/stdint.h.html)
>

I recall reading that rather than require complicated semantics for
files, sockets, and such that would allow CHAR_BIT > 8, POSIX decided
just to require CHAR_BIT == 8 and be done with it.  (Though all the
RFC Internet Standards are specified in terms of "octets", not
"bytes".)




More information about the cfe-dev mailing list