Date: Thu, 31 Jan 2002 16:53:30 +0300 From: "Andrey Simonenko" <simon@comsys.ntu-kpi.kiev.ua> To: "June Carey" <carey_june@hotmail.com> Cc: <freebsd-questions@freebsd.org> Subject: Re: unsigned char portability Message-ID: <00af01c1aa5e$aaf1b6e0$6d36120a@comsys.ntukpi.kiev.ua> References: <F74DyNdauuNi4kysRWz00010abe@hotmail.com.lucky.freebsd.questions>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: June Carey <carey_june@hotmail.com> Newsgroups: lucky.freebsd.questions Sent: Thursday, January 31, 2002 5:48 PM Subject: unsigned char portability > I have a question I was hoping someone could answer. > Does the "unsigned char" C type have any machine architecture portability > problems ? > I rather suspect the answer is NO, since I seem to recall that "The Design > and Implementation of the 4.4BSD Operating System" book mentions that > bytes/octets are network portable in their native bit-ordering. > As I know there aren't problems with the "unsigned char" C type (8 bits) on different architectures. At least I never see anything about problems with 8-bits char C-type. BTW if there will be any problems with architecture portability in 8-bit char, then it will be impossible to transfere information via network. Currently we have to use htons() and ntohs() like functions to convert values between host and network byte order, but these values are 16-bits long. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00af01c1aa5e$aaf1b6e0$6d36120a>