This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Endianess


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]