diff --git a/common.h b/common.h index 1432a53..1782215 100644 --- a/common.h +++ b/common.h @@ -28,7 +28,7 @@ //#include //Provides declarations for tcp header //#include //#include //Provides declarations for ip header -#include +//#include #include #include //#include @@ -62,6 +62,7 @@ using namespace std; #if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \ + defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ || \ defined(__BIG_ENDIAN__) || \ defined(__ARMEB__) || \ defined(__THUMBEB__) || \ @@ -72,6 +73,7 @@ using namespace std; #if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || \ + defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ || \ defined(__LITTLE_ENDIAN__) || \ defined(__ARMEL__) || \ defined(__THUMBEL__) || \ @@ -89,6 +91,7 @@ using namespace std; #error "endian detection failed" #endif + typedef unsigned long long u64_t; //this works on most platform,avoid using the PRId64 typedef long long i64_t;