asm/byteorder.h:
#define ntohl(x) ((unsigned long int)(x))
#define ntohs(x) ((unsigned short int)(x))
#define htonl(x) ((unsigned long int)(x))
#define htons(x) ((unsigned short int)(x))
It's difficult to write:
#include <asm/byteorder.h>
int main()
{
unsigned long (*foo)(unsigned long) = htonl;
return (*foo)(17);
}
so, why not:
static inline unsigned long int htonl(unsigned long int x) { return x; }
/Magnus
map@stacken.kth.se