slp_platformselect.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Platform Selection for Stackless Python
  3. */
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #if defined(MS_WIN32) && !defined(MS_WIN64) && defined(_M_IX86) && defined(_MSC_VER)
  8. #include "platform/switch_x86_msvc.h" /* MS Visual Studio on X86 */
  9. #elif defined(MS_WIN64) && defined(_M_X64) && defined(_MSC_VER) || defined(__MINGW64__)
  10. #include "platform/switch_x64_msvc.h" /* MS Visual Studio on X64 */
  11. #elif defined(MS_WIN64) && defined(_M_ARM64)
  12. #include "platform/switch_arm64_msvc.h" /* MS Visual Studio on ARM64 */
  13. #elif defined(__GNUC__) && defined(__amd64__) && defined(__ILP32__)
  14. #include "platform/switch_x32_unix.h" /* gcc on amd64 with x32 ABI */
  15. #elif defined(__GNUC__) && defined(__amd64__)
  16. #include "platform/switch_amd64_unix.h" /* gcc on amd64 */
  17. #elif defined(__GNUC__) && defined(__i386__)
  18. #include "platform/switch_x86_unix.h" /* gcc on X86 */
  19. #elif defined(__GNUC__) && defined(__powerpc64__) && (defined(__linux__) || defined(__FreeBSD__))
  20. #include "platform/switch_ppc64_linux.h" /* gcc on PowerPC 64-bit */
  21. #elif defined(__GNUC__) && defined(__PPC__) && (defined(__linux__) || defined(__FreeBSD__))
  22. #include "platform/switch_ppc_linux.h" /* gcc on PowerPC */
  23. #elif defined(__GNUC__) && defined(__ppc__) && defined(__APPLE__)
  24. #include "platform/switch_ppc_macosx.h" /* Apple MacOS X on PowerPC */
  25. #elif defined(__GNUC__) && defined(__powerpc64__) && defined(_AIX)
  26. #include "platform/switch_ppc64_aix.h" /* gcc on AIX/PowerPC 64-bit */
  27. #elif defined(__GNUC__) && defined(_ARCH_PPC) && defined(_AIX)
  28. #include "platform/switch_ppc_aix.h" /* gcc on AIX/PowerPC */
  29. #elif defined(__GNUC__) && defined(sparc)
  30. #include "platform/switch_sparc_sun_gcc.h" /* SunOS sparc with gcc */
  31. #elif defined(__SUNPRO_C) && defined(sparc) && defined(sun)
  32. #include "platform/switch_sparc_sun_gcc.h" /* SunStudio on amd64 */
  33. #elif defined(__SUNPRO_C) && defined(__amd64__) && defined(sun)
  34. #include "platform/switch_amd64_unix.h" /* SunStudio on amd64 */
  35. #elif defined(__SUNPRO_C) && defined(__i386__) && defined(sun)
  36. #include "platform/switch_x86_unix.h" /* SunStudio on x86 */
  37. #elif defined(__GNUC__) && defined(__s390__) && defined(__linux__)
  38. #include "platform/switch_s390_unix.h" /* Linux/S390 */
  39. #elif defined(__GNUC__) && defined(__s390x__) && defined(__linux__)
  40. #include "platform/switch_s390_unix.h" /* Linux/S390 zSeries (64-bit) */
  41. #elif defined(__GNUC__) && defined(__arm__)
  42. #ifdef __APPLE__
  43. #include <TargetConditionals.h>
  44. #endif
  45. #if TARGET_OS_IPHONE
  46. #include "platform/switch_arm32_ios.h" /* iPhone OS on arm32 */
  47. #else
  48. #include "platform/switch_arm32_gcc.h" /* gcc using arm32 */
  49. #endif
  50. #elif defined(__GNUC__) && defined(__mips__) && defined(__linux__)
  51. #include "platform/switch_mips_unix.h" /* Linux/MIPS */
  52. #elif defined(__GNUC__) && defined(__aarch64__)
  53. #include "platform/switch_aarch64_gcc.h" /* Aarch64 ABI */
  54. #elif defined(__GNUC__) && defined(__mc68000__)
  55. #include "platform/switch_m68k_gcc.h" /* gcc on m68k */
  56. #elif defined(__GNUC__) && defined(__csky__)
  57. #include "platform/switch_csky_gcc.h" /* gcc on csky */
  58. #elif defined(__GNUC__) && defined(__riscv)
  59. #include "platform/switch_riscv_unix.h" /* gcc on RISC-V */
  60. #elif defined(__GNUC__) && defined(__alpha__)
  61. #include "platform/switch_alpha_unix.h" /* gcc on DEC Alpha */
  62. #endif
  63. #ifdef __cplusplus
  64. };
  65. #endif