Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: None | Size: 0.62 KB | Hits: 70 | Expires: Never
Copy text to clipboard
  1. #ifndef LIBEBML_CONFIG_H
  2. #define LIBEBML_CONFIG_H
  3.  
  4. // automatic endianess detection working on GCC
  5. #if !defined(WORDS_BIGENDIAN)
  6. #if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) || defined (__amd64__) || defined (__x86_64__)
  7. #undef WORDS_BIGENDIAN
  8. #elif defined (__sparc__) || defined (__alpha__) || defined (__PPC__) || defined (__mips__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
  9. #define WORDS_BIGENDIAN 1
  10. #else
  11. // not automatically detected, put it yourself
  12. #undef WORDS_BIGENDIAN // for my testing platform (x86)
  13. #endif