* reordered a little bit
[mascara-docs.git] / i86 / elks / elksnet / ktcp / mylib.h
blobf4f20652ec3586d8cd1bcb55a9fac25352cf1ae9
1 #ifndef MYLIB_H
2 #define MYLIB_H
4 #ifndef ntohs
6 #define ntohs(x) ( (((x) >> 8) & 0xff) | ((x) << 8) )
7 #define htons(x) ntohs(x)
8 #endif
10 #define ntohl(x) ( (((x) >> 24) & 0xff) | \
11 (((x) >> 8 ) & 0xff00) | \
12 (((x) & 0xff00) << 8) | \
13 (((x) & 0xff) << 24) )
15 #define htonl(x) ntohl(x)
17 #endif