"unsigned char" portability issues

Adam blueeskimo at gmx.net
Wed Apr 9 08:23:40 PDT 2003


On Wed, 2003-04-09 at 10:50, Robin Carey wrote:
> Dear FreeBSD-questions,
> 
> I am writing some free software which uses the "unsigned char" C type.
> 
> Some people have been raising the issue that the "unsigned char" type might be bigger than 8-bits and that there is therefore portability issues with it.
> 
> Yet this C type is used in OpenSSL and in the SHA and MD5 routines shipped with FreeBSD, and the way in which it is used in these programs implicitly assumes it is exactly one byte in size.
> 
> Can someone please give me some good advice on this issue ?
> 
> Does the "unsigned char" type vary in size for different FreeBSD architectures ?

This is something I've long pondered over myself .. If you find any
definitive answers, drop me an email to let me know .. 

Thanks,
-- 
Adam <blueeskimo at gmx.net>



More information about the freebsd-questions mailing list