* reordered a little bit
[mascara-docs.git] / i86 / elks / elkscmd / inet / nettools / mylib.h
blob427ec6be9236c937a5721eca40941833f48bd8f8
1 #ifndef __MYLIB_H__
2 #define __MYLIB_H__
4 #ifdef __ELKS__
6 #ifndef ntohs
7 #define ntohs(x) ( ((x) >> 8 & 0xff)|((x) << 8) )
8 #define htons(x) ntohs(x)
9 #endif
11 #define ntohl(x) ( (((x) >> 24)&0xff)| \
12 (((x) >> 8 )&0xff00)| \
13 (((x) & 0xff00) << 8)| \
14 (((x) & 0xff) << 24) )
16 #define htonl(x) ntohl(x)
18 #endif
20 #endif