# HG changeset patch # User Matti Hamalainen # Date 1318190620 -10800 # Node ID 2a452b14230144cb87ad43c916b9bfe4cb2f9d36 # Parent 1607c0691deeee7520780bc12e47e8617ebe8ec1 Byteorder changes. diff -r 1607c0691dee -r 2a452b142301 th_endian.h --- a/th_endian.h Sun Oct 09 22:37:58 2011 +0300 +++ b/th_endian.h Sun Oct 09 23:03:40 2011 +0300 @@ -18,6 +18,15 @@ extern "C" { #endif +/* Check endianess + */ +#ifndef TH_BYTEORDER +# error Undefined byteorder (TH_BYTEORDER not set.) +#endif + +#define TH_BIG_ENDIAN 1234 +#define TH_LITTLE_ENDIAN 4321 + /* Endianess swapping macros */ @@ -46,10 +55,6 @@ /* Macros that swap only when needed ... */ -#ifndef TH_BYTEORDER -# error Undefined byteorder (TH_BYTEORDER not set.) -#endif - #if (TH_BYTEORDER == TH_BIG_ENDIAN) #define TH_LE16_TO_NATIVE(value) TH_SWAP_16_LE_BE(value)