diff --git a/src/utility.h b/src/utility.h new file mode 100644 index 00000000..64d2e16b --- /dev/null +++ b/src/utility.h @@ -0,0 +1,16 @@ +#ifndef CC_UTILITY_H +#define CC_UTILITY_H + +#ifdef _WIN32 +#include +#else +#include +#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