Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: headers for htonl etc.?
Date: 2000/01/03	[thread overview]
Message-ID: <3870721D.C59B05AC@ife.ee.ethz.ch> (raw)

Which files do I need to include to get definitions of htonl etc.?

I tried to #include <asm/byteorder.h>. I get some (inlined) definitions,
but they are incompatible with <netinet/in.h>, which I sometimes need
for other stuff (INADDR_ANY)
If I #include <netinet/in.h>, it can't find the functions to link with.
In netinet/in.h, there is a switch to use builtin __swab functions.
What I'm doing now is #define __OPTIMIZE__ unless it was defined before
and the #include <netinet/in.h>

What is the best way? And what is a good way to convert 64-bit values?

- Alex



                 reply	other threads:[~2000-01-03  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox