[Gllug] endian.h

Mike Brodbelt mike at coruscant.demon.co.uk
Wed Feb 5 02:17:41 UTC 2003




I'm interested in porting a small OpenBSD program to Linux, but I'm
currently having grief getting parts of it to compile.

One of the source files makes use of functions like betoh32(),
letoh32(), and also the 16bit variants of those. On OpenBSD, the
function prototypes are in <machine/endian.h>, but, though Linux has an
endian.h file, those functions aren't in it.

What can I replace <machine/endian.h> with in order to get this to
compile? Or is it a case of #ifdef'ing out those function calls, and
replacing them with Linux equivalents?

TIA,

Mike.


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list