some hash define added which are used in multiple file

This commit is contained in:
Anshul Maheshwari 2014-06-17 11:44:57 +05:30
parent 1e75295939
commit f66825ae1c

16
src/utility.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef CC_UTILITY_H
#define CC_UTILITY_H
#ifdef _WIN32
#include <winsock2.h>
#else
#include <arpa/inet.h>
#endif
#define RL32(x) (*(unsigned int *)(x))
#define RB32(x) (ntohl(*(unsigned int *)(x)))
#define RL16(x) (*(unsigned short int*)(x))
#define RB16(x) (ntohs(*(unsigned short int*)(x)))
#endif