diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2015-02-05 08:49:08 +0300 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2015-02-05 08:49:08 +0300 |
commit | 476466f4e08b0c24b691255a6a746d22ebc5e8ce (patch) | |
tree | 86bdf9fcce670b6f8629e6cfe9245db9a027365f /include | |
parent | bcdee7f067d84a27d0350bd9e11280380e5bf372 (diff) |
bitmap.c big endian fix
Diffstat (limited to 'include')
-rw-r--r-- | include/freerdp/types.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/freerdp/types.h b/include/freerdp/types.h index 57909be..3fefbab 100644 --- a/include/freerdp/types.h +++ b/include/freerdp/types.h @@ -35,6 +35,21 @@ #include <stdint.h> #endif +/* check endianess */ +#if !(defined(L_ENDIAN) || defined(B_ENDIAN)) +#if !defined(__BYTE_ORDER) && defined(__linux__) +#include <endian.h> +#endif + +#if !(defined(L_ENDIAN) || defined(B_ENDIAN)) +#if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || defined(__hppa__) +#define B_ENDIAN +#else +#define L_ENDIAN +#endif +#endif +#endif + #if !(defined(NO_NEED_ALIGN) || defined(NEED_ALIGN)) #if defined(__x86__) || defined(__x86_64__) || defined(__AMD64__) || defined(_M_IX86) || defined (_M_AMD64) || defined(__i386__) #define NO_NEED_ALIGN |