You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.0 KiB

10 years ago
  1. /* -*- coding: utf-8 -*-
  2. * ----------------------------------------------------------------------
  3. * Copyright © 2012-2013, RedJack, LLC.
  4. * All rights reserved.
  5. *
  6. * Please see the COPYING file in this distribution for license
  7. * details.
  8. * ----------------------------------------------------------------------
  9. */
  10. #ifndef LIBCORK_CONFIG_ARCH_H
  11. #define LIBCORK_CONFIG_ARCH_H
  12. /*-----------------------------------------------------------------------
  13. * Platform
  14. */
  15. #if defined(__i386__) || defined(_M_IX86)
  16. #define CORK_CONFIG_ARCH_X86 1
  17. #else
  18. #define CORK_CONFIG_ARCH_X86 0
  19. #endif
  20. #if defined(__x86_64__) || defined(_M_X64)
  21. #define CORK_CONFIG_ARCH_X64 1
  22. #else
  23. #define CORK_CONFIG_ARCH_X64 0
  24. #endif
  25. #if defined(__powerpc__) || defined(__ppc__)
  26. /* GCC-ish compiler */
  27. #define CORK_CONFIG_ARCH_PPC 1
  28. #elif defined(_M_PPC)
  29. /* VS-ish compiler */
  30. #define CORK_CONFIG_ARCH_PPC 1
  31. #elif defined(_ARCH_PPC)
  32. /* Something called XL C/C++? */
  33. #define CORK_CONFIG_ARCH_PPC 1
  34. #else
  35. #define CORK_CONFIG_ARCH_PPC 0
  36. #endif
  37. #endif /* LIBCORK_CONFIG_ARCH_H */