il2cpp-config-mono.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #pragma once
  2. #include "il2cpp-config-platforms.h"
  3. #include <stdint.h>
  4. #define MONO_CONFIG_H_WAS_INCLUDED
  5. //If we're building for a windows platform, check that we're not building on xp or earlier
  6. #if IL2CPP_TARGET_WINDOWS
  7. #include "il2cpp-config-mono-win.h"
  8. #elif IL2CPP_TARGET_IOS
  9. #include "il2cpp-config-mono-ios.h"
  10. #elif IL2CPP_TARGET_DARWIN
  11. #include "il2cpp-config-mono-osx.h"
  12. #elif IL2CPP_TARGET_LINUX
  13. #include "il2cpp-config-mono-linux.h"
  14. #elif IL2CPP_TARGET_QNX
  15. #include "il2cpp-config-mono-qnx.h"
  16. #elif IL2CPP_TARGET_ANDROID
  17. #include "il2cpp-config-mono-android.h"
  18. #elif IL2CPP_TARGET_JAVASCRIPT
  19. #include "il2cpp-config-mono-web.h"
  20. #else
  21. //Uncomment out after all platforms defines moved to header file
  22. //#error "Mono Code Compiled on Unimplemented Platform"
  23. #endif
  24. #if defined(PID_T_IS_INT)
  25. typedef int pid_t;
  26. #endif
  27. //This value will need to be checked each time we update mono
  28. #define MONO_CORLIB_VERSION 1050001000
  29. #define VERSION "5.0.1"
  30. #if defined(ARCHITECTURE_IS_X86)
  31. #define HOST_X86 1
  32. #define TARGET_X86 1
  33. #define MONO_ARCHITECTURE "x86"
  34. #elif defined(ARCHITECTURE_IS_AMD64)
  35. #define HOST_AMD64 1
  36. #define TARGET_AMD64 1
  37. #define MONO_ARCHITECTURE "amd64"
  38. #elif defined(ARCHITECTURE_IS_ARMv7)
  39. #define HOST_ARM 1
  40. #define TARGET_ARM 1
  41. #define MONO_ARCHITECTURE "arm"
  42. #define HAVE_ARMV7 1
  43. #elif defined(ARCHITECTURE_IS_AARCH64)
  44. #define HOST_AARCH64 1
  45. #define TARGET_AARCH64 1
  46. #define MONO_ARCHITECTURE "aarch64"
  47. #elif defined(ARCHITECTURE_IS_ARM64)
  48. #define HOST_ARM64 1
  49. #define TARGET_ARM64 1
  50. #define MONO_ARCHITECTURE "arm64"
  51. #elif defined(ARCHITECTURE_IS_WEB)
  52. #define TARGET_WASM 1
  53. #define MONO_ARCHITECTURE "wasm"
  54. #else
  55. #error Architecture not defined for this platform
  56. #endif
  57. typedef uintptr_t gsize;
  58. typedef intptr_t gssize;
  59. #define G_GSIZE_FORMAT "PRIdPTR"
  60. #if defined(GPID_IS_VOID_P)
  61. typedef void * GPid;
  62. #elif defined(GPID_IS_INT)
  63. typedef int GPid;
  64. #else
  65. #error GPID type is not defined for this platform
  66. #endif
  67. #if defined(PLATFORM_IS_LITTLE_ENDIAN)
  68. #define G_BYTE_ORDER G_LITTLE_ENDIAN
  69. #define TARGET_BYTE_ORDER G_LITTLE_ENDIAN
  70. #else
  71. #error Platform Endianness is not defined for this platform
  72. #endif
  73. #if defined(G_DIR_SEPARATOR_IS_BACKSLASH)
  74. #define G_DIR_SEPARATOR '\\'
  75. #define G_DIR_SEPARATOR_S "\\"
  76. #elif defined(G_DIR_SEPARATOR_IS_FORWARDSLASH)
  77. #define G_DIR_SEPARATOR '/'
  78. #define G_DIR_SEPARATOR_S "/"
  79. #else
  80. #error G_DIR_SEPARATOR not defined for this platform
  81. #endif
  82. #if defined(G_SEARCHPATH_SEPARATOR_IS_SEMICOLON)
  83. #define G_SEARCHPATH_SEPARATOR ';'
  84. #define G_SEARCHPATH_SEPARATOR_S ";"
  85. #elif defined(G_SEARCHPATH_SEPARATOR_IS_COLON)
  86. #define G_SEARCHPATH_SEPARATOR ':'
  87. #define G_SEARCHPATH_SEPARATOR_S ":"
  88. #else
  89. #error G_SEARCHPATH_SEPARATOR not defined for this platform
  90. #endif
  91. #if defined(STDOUT_STDERR_REQUIRES_CAST)
  92. #define STDOUT_FILENO (int)(intptr_t)stdout
  93. #define STDERR_FILENO (int)(intptr_t)stderr
  94. #endif
  95. #if defined(HAVE_GNUC_PRETTY_FUNCTION)
  96. #define G_GNUC_PRETTY_FUNCTION __FUNCTION__
  97. #else
  98. #define G_GNUC_PRETTY_FUNCTION
  99. #endif
  100. #if defined(HAVE_DEV_RANDOM)
  101. #define NAME_DEV_RANDOM "/dev/random"
  102. #else
  103. #define NAME_DEV_RANDOM
  104. #endif
  105. #if defined(HAVE_GNUC_UNUSED)
  106. #define G_GNUC_UNUSED __attribute__((__unused__))
  107. #else
  108. #define G_GNUC_UNUSED
  109. #endif
  110. #if defined(HAVE_GNUC_NORETURN)
  111. #define G_GNUC_NORETURN __attribute__((__noreturn__))
  112. #else
  113. #define G_GNUC_NORETURN
  114. #endif
  115. #define SIZEOF_VOID_P IL2CPP_SIZEOF_VOID_P
  116. #define SIZEOF_REGISTER IL2CPP_SIZEOF_VOID_P
  117. #define SIZEOF_SIZE_T sizeof(size_t)
  118. #define SIZEOF_LONG sizeof(long)
  119. #define SIZEOF_INT sizeof(int)
  120. #define SIZEOF_LONG_LONG sizeof(long long)