This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Endianess
- From: "Artem B. Bityuckiy" <mail_lists at mail dot ru>
- To: newlib at sources dot redhat dot com
- Date: Wed, 10 Sep 2003 14:25:29 +0400
- Subject: Endianess
- Reply-to: mail_lists at mail dot ru
Hello.
I'm porting several peaces from FreeBSD to Newlib. FreeBSD's code needs
ntons() and htonl() functions. These functions aren't the part of Newlib.
To implement these functions in the machine independent manner I need
functions like word_swap, etc or macros like BIG_ENDIAN. I can implement
my own private versions of htons(), etc using these macros. But may be
it is more correct to to create file like machine/endian.h.
What is the best that I can do?
Thanks.