[Gllug] endian.h
rich at annexia.org
rich at annexia.org
Wed Feb 5 10:16:36 UTC 2003
On Wed, Feb 05, 2003 at 02:17:41AM +0000, Mike Brodbelt wrote:
>
>
>
> 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?
Perhaps use the htonl and htons (etc) calls?
Rich.
--
Richard Jones, Red Hat Inc. (London, UK) http://www.redhat.com/software/ccm
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list