PageRenderTime 78ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/platform/shared/ruby/iphone/ruby/config.h

http://github.com/rhomobile/rhodes
C Header | 611 lines | 455 code | 72 blank | 84 comment | 1 complexity | 0185f0784fae22f14d74d34b4a5f6211 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, MIT, Apache-2.0, LGPL-2.1, GPL-2.0, MPL-2.0-no-copyleft-exception
  1. #ifndef INCLUDE_RUBY_CONFIG_H
  2. #define INCLUDE_RUBY_CONFIG_H 1
  3. //RHO
  4. #include <TargetConditionals.h>
  5. /* confdefs.h */
  6. #define CANONICALIZATION_FOR_MATHN 1
  7. #define STDC_HEADERS 1
  8. #define HAVE_SYS_TYPES_H 1
  9. #define HAVE_SYS_STAT_H 1
  10. #define HAVE_STDLIB_H 1
  11. #define HAVE_STRING_H 1
  12. #define HAVE_MEMORY_H 1
  13. #define HAVE_STRINGS_H 1
  14. #define HAVE_INTTYPES_H 1
  15. #define HAVE_STDINT_H 1
  16. #define HAVE_UNISTD_H 1
  17. #define __EXTENSIONS__ 1
  18. #define _ALL_SOURCE 1
  19. #define _GNU_SOURCE 1
  20. #define _POSIX_PTHREAD_SEMANTICS 1
  21. #define _TANDEM_SOURCE 1
  22. #define HAVE_INFINITY 1
  23. #define HAVE_NAN 1
  24. #define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)")
  25. #define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop")
  26. #define BROKEN_CRYPT 1
  27. #define HAVE_TYPE_SOCKLEN_T 1
  28. #define HAVE_GETADDRINFO 1
  29. #define HAVE_TYPE_STRUCT_SOCKADDR_STORAGE 1
  30. #define HAVE_TYPE_STRUCT_ADDRINFO 1
  31. #define HAVE_GAI_STRERROR 1
  32. #define GAI_STRERROR_CONST 1
  33. #define HAVE_NET_IF_H 1
  34. #define IPPROTO_IPV6 1
  35. #define HAVE_TYPE_STRUCT_IPV6_MREQ 1
  36. //>>>
  37. #define HAVE_CONST_AF_INET 1
  38. #define HAVE_CONST_PF_INET6 1
  39. //#define HAVE_CONST_TCP_MAXSEG 1
  40. #define HAVE_CONST_SOCK_STREAM 1
  41. #define HAVE_CONST_AI_PASSIVE 1
  42. #define HAVE_CONST_IPPROTO_TCP 1
  43. #define HAVE_CONST_IPPROTO_EGP 1
  44. #define HAVE_CONST_IPPROTO_PUP 1
  45. #define HAVE_CONST_IPPROTO_UDP 1
  46. #define HAVE_CONST_IPPROTO_IDP 1
  47. #define HAVE_CONST_IPPROTO_AH 1
  48. #define HAVE_CONST_IPPROTO_ESP 1
  49. #define HAVE_CONST_IPPROTO_RAW 1
  50. #define HAVE_CONST_IPPROTO_MAX 1
  51. #define HAVE_CONST_IPPORT_RESERVED 1
  52. #define HAVE_CONST_INADDR_ANY 1
  53. #define HAVE_CONST_INADDR_BROADCAST 1
  54. #define HAVE_CONST_INADDR_LOOPBACK 1
  55. #define HAVE_CONST_INADDR_NONE 1
  56. #define HAVE_CONST_IP_OPTIONS 1
  57. #define HAVE_CONST_IP_HDRINCL 1
  58. #define HAVE_CONST_IP_TOS 1
  59. #define HAVE_CONST_IP_TTL 1
  60. #define HAVE_TYPE_STRUCT_ADDRINFO 1
  61. #define HAVE_TYPE_STRUCT_SOCKADDR_STORAGE 1
  62. #define HAVE_GAI_STRERROR 1
  63. //#define HAVE_INET_PTON 1
  64. #define HAVE_TYPE_STRUCT_IP_MREQ 1
  65. //<<<
  66. //RHO
  67. //#define HAVE_CRT_EXTERNS_H 1
  68. #define HAVE_LIBDL 1
  69. #define HAVE_DIRENT_H 1
  70. #define HAVE__BOOL 1
  71. #define HAVE_STDBOOL_H 1
  72. #define HAVE_SYS_WAIT_H 1
  73. #define HAVE_GRP_H 1
  74. #define HAVE_FCNTL_H 1
  75. #define HAVE_FLOAT_H 1
  76. #define HAVE_LANGINFO_H 1
  77. #define HAVE_LIMITS_H 1
  78. #define HAVE_LOCALE_H 1
  79. #define HAVE_MALLOC_MALLOC_H 1
  80. #define HAVE_PWD_H 1
  81. #define HAVE_SYS_ATTR_H 1
  82. #define HAVE_SYS_FCNTL_H 1
  83. #define HAVE_SYS_FILE_H 1
  84. #define HAVE_SYS_IOCTL_H 1
  85. #define HAVE_SYS_PARAM_H 1
  86. #define HAVE_SYS_RESOURCE_H 1
  87. #define HAVE_SYS_SELECT_H 1
  88. #define HAVE_SYS_SOCKET_H 1
  89. #define HAVE_SYS_SYSCALL_H 1
  90. #define HAVE_SYS_TIME_H 1
  91. #define HAVE_SYS_TIMES_H 1
  92. #define HAVE_SYS_UIO_H 1
  93. #define HAVE_TIME_H 1
  94. #define HAVE_UTIME_H 1
  95. #define HAVE_TYPEOF 1
  96. #define typeof __typeof__
  97. #define HAVE_LONG_LONG 1
  98. #define HAVE_OFF_T 1
  99. #define SIZEOF_INT 4
  100. #define SIZEOF_SHORT 2
  101. //RHO
  102. #if TARGET_RT_64_BIT
  103. #define SIZEOF_LONG 8
  104. #else
  105. #define SIZEOF_LONG 4
  106. #endif
  107. //RHO
  108. #define SIZEOF_LONG_LONG 8
  109. #define SIZEOF___INT64 0
  110. #define SIZEOF___INT128 16
  111. #define SIZEOF_OFF_T 8
  112. //RHO
  113. #if TARGET_RT_64_BIT
  114. #define SIZEOF_VOIDP 8
  115. #else
  116. #define SIZEOF_VOIDP 4
  117. #endif
  118. //RHO
  119. #define SIZEOF_FLOAT 4
  120. #define SIZEOF_DOUBLE 8
  121. //RHO
  122. #if TARGET_RT_64_BIT
  123. #define SIZEOF_TIME_T 8
  124. #define SIZEOF_CLOCK_T 8
  125. #else
  126. #define SIZEOF_TIME_T 4
  127. #define SIZEOF_CLOCK_T 4
  128. #endif
  129. //RHO
  130. #define PACKED_STRUCT(x) x __attribute__((packed))
  131. #define PACKED_STRUCT_UNALIGNED(x) x
  132. #define PRI_LL_PREFIX "ll"
  133. #define rb_pid_t pid_t
  134. #define SIGNEDNESS_OF_PID_T -1
  135. #define PIDT2NUM(v) INT2NUM(v)
  136. #define NUM2PIDT(v) NUM2INT(v)
  137. #define PRI_PIDT_PREFIX PRI_INT_PREFIX
  138. #define rb_uid_t uid_t
  139. #define SIGNEDNESS_OF_UID_T +1
  140. #define UIDT2NUM(v) UINT2NUM(v)
  141. #define NUM2UIDT(v) NUM2UINT(v)
  142. #define PRI_UIDT_PREFIX PRI_INT_PREFIX
  143. #define rb_gid_t gid_t
  144. #define SIGNEDNESS_OF_GID_T +1
  145. #define GIDT2NUM(v) UINT2NUM(v)
  146. #define NUM2GIDT(v) NUM2UINT(v)
  147. #define PRI_GIDT_PREFIX PRI_INT_PREFIX
  148. #define rb_time_t time_t
  149. #define SIGNEDNESS_OF_TIME_T -1
  150. #define TIMET2NUM(v) LONG2NUM(v)
  151. #define NUM2TIMET(v) NUM2LONG(v)
  152. #define PRI_TIMET_PREFIX PRI_LONG_PREFIX
  153. #define rb_dev_t dev_t
  154. #define SIGNEDNESS_OF_DEV_T -1
  155. #define DEVT2NUM(v) INT2NUM(v)
  156. #define NUM2DEVT(v) NUM2INT(v)
  157. #define PRI_DEVT_PREFIX PRI_INT_PREFIX
  158. #define rb_mode_t mode_t
  159. #define SIGNEDNESS_OF_MODE_T +1
  160. #define MODET2NUM(v) UINT2NUM(v)
  161. #define NUM2MODET(v) NUM2UINT(v)
  162. #define PRI_MODET_PREFIX PRI_INT_PREFIX
  163. #define rb_rlim_t rlim_t
  164. #define SIGNEDNESS_OF_RLIM_T +1
  165. //RHO
  166. #if TARGET_RT_64_BIT
  167. #define RLIM2NUM(v) ULONG2NUM(v)
  168. #define NUM2RLIM(v) NUM2ULONG(v)
  169. #define PRI_RLIM_PREFIX PRI_LONG_PREFIX
  170. #else //32bit
  171. #define RLIM2NUM(v) ULL2NUM(v)
  172. #define NUM2RLIM(v) NUM2ULL(v)
  173. #define PRI_RLIM_PREFIX PRI_LL_PREFIX
  174. #endif
  175. //RHO
  176. #define rb_off_t off_t
  177. #define SIGNEDNESS_OF_OFF_T -1
  178. //RHO
  179. #if TARGET_RT_64_BIT
  180. #define OFFT2NUM(v) LONG2NUM(v)
  181. #define NUM2OFFT(v) NUM2LONG(v)
  182. #define PRI_OFFT_PREFIX PRI_LONG_PREFIX
  183. #else //32bit
  184. #define OFFT2NUM(v) LL2NUM(v)
  185. #define NUM2OFFT(v) NUM2LL(v)
  186. #define PRI_OFFT_PREFIX PRI_LL_PREFIX
  187. #endif
  188. //RHO
  189. #define rb_clockid_t int
  190. #define SIGNEDNESS_OF_CLOCKID_T -1
  191. #define CLOCKID2NUM(v) INT2NUM(v)
  192. #define NUM2CLOCKID(v) NUM2INT(v)
  193. #define PRI_CLOCKID_PREFIX PRI_INT_PREFIX
  194. #define HAVE_PROTOTYPES 1
  195. #define TOKEN_PASTE(x,y) x##y
  196. #define STRINGIZE(expr) STRINGIZE0(expr)
  197. #define HAVE_STDARG_PROTOTYPES 1
  198. #define HAVE_VA_ARGS_MACRO 1
  199. #define NORETURN(x) __attribute__ ((noreturn)) x
  200. #define DEPRECATED(x) __attribute__ ((deprecated)) x
  201. #define DEPRECATED_BY(n,x) __attribute__ ((deprecated("by "#n))) x
  202. #define DEPRECATED_TYPE(mesg,x) x __attribute__ ((deprecated mesg))
  203. #define NOINLINE(x) __attribute__ ((noinline)) x
  204. #define WEAK(x) __attribute__ ((weak)) x
  205. #define HAVE_FUNC_WEAK 1
  206. //RHO
  207. #if TARGET_OS_SIMULATOR
  208. #define FUNC_CDECL(x) __attribute__ ((cdecl)) x
  209. #endif
  210. //RHO
  211. #define HAVE_GCC_ATOMIC_BUILTINS 1
  212. #define HAVE_GCC_SYNC_BUILTINS 1
  213. #define UNREACHABLE __builtin_unreachable()
  214. #define RUBY_FUNC_EXPORTED __attribute__ ((visibility("default"))) extern
  215. #define RUBY_FUNCTION_NAME_STRING __func__
  216. #define ENUM_OVER_INT 1
  217. #define HAVE_DECL_SYS_NERR 1
  218. #define HAVE_DECL_GETENV 1
  219. //RHO
  220. #if TARGET_RT_64_BIT
  221. #define SIZEOF_SIZE_T 8
  222. #define SIZEOF_PTRDIFF_T 8
  223. #else
  224. #define SIZEOF_SIZE_T 4
  225. #define SIZEOF_PTRDIFF_T 4
  226. #endif
  227. //RHO
  228. #define PRI_SIZE_PREFIX "z"
  229. #define PRI_PTRDIFF_PREFIX "t"
  230. #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
  231. #define HAVE_ST_BLKSIZE 1
  232. #define HAVE_STRUCT_STAT_ST_BLOCKS 1
  233. #define HAVE_ST_BLOCKS 1
  234. #define HAVE_STRUCT_STAT_ST_RDEV 1
  235. #define HAVE_ST_RDEV 1
  236. #define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
  237. #define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
  238. //RHO
  239. #if TARGET_RT_64_BIT
  240. #define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
  241. #else
  242. #define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG_LONG
  243. #endif
  244. //RHO
  245. #define HAVE_STRUCT_STAT_ST_ATIMESPEC 1
  246. #define HAVE_STRUCT_STAT_ST_MTIMESPEC 1
  247. #define HAVE_STRUCT_STAT_ST_CTIMESPEC 1
  248. #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC 1
  249. #define HAVE_STRUCT_TIMEVAL 1
  250. #define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T
  251. #define HAVE_STRUCT_TIMESPEC 1
  252. #define HAVE_STRUCT_TIMEZONE 1
  253. #define HAVE_RB_FD_INIT 1
  254. #define HAVE_INT8_T 1
  255. #define SIZEOF_INT8_T 1
  256. #define HAVE_UINT8_T 1
  257. #define SIZEOF_UINT8_T 1
  258. #define HAVE_INT16_T 1
  259. #define SIZEOF_INT16_T 2
  260. #define HAVE_UINT16_T 1
  261. #define SIZEOF_UINT16_T 2
  262. #define HAVE_INT32_T 1
  263. #define SIZEOF_INT32_T 4
  264. #define HAVE_UINT32_T 1
  265. #define SIZEOF_UINT32_T 4
  266. #define HAVE_INT64_T 1
  267. #define SIZEOF_INT64_T 8
  268. #define HAVE_UINT64_T 1
  269. #define SIZEOF_UINT64_T 8
  270. #define HAVE_INTPTR_T 1
  271. //RHO
  272. #if TARGET_RT_64_BIT
  273. #define SIZEOF_INTPTR_T 8
  274. #else
  275. #define SIZEOF_INTPTR_T 4
  276. #endif
  277. //RHO
  278. #define HAVE_UINTPTR_T 1
  279. //RHO
  280. #if TARGET_RT_64_BIT
  281. #define SIZEOF_UINTPTR_T 8
  282. #else
  283. #define SIZEOF_UINTPTR_T 4
  284. #endif
  285. //RHO
  286. #define HAVE_SSIZE_T 1
  287. //RHO
  288. #if TARGET_RT_64_BIT
  289. #define SIZEOF_SSIZE_T 8
  290. #else
  291. #define SIZEOF_SSIZE_T 4
  292. #endif
  293. //RHO
  294. #define GETGROUPS_T gid_t
  295. #define RETSIGTYPE void
  296. #define HAVE_ALLOCA_H 1
  297. #define HAVE_ALLOCA 1
  298. #define HAVE_ACOSH 1
  299. #define HAVE_CBRT 1
  300. #define HAVE_CRYPT 1
  301. #define HAVE_DUP2 1
  302. #define HAVE_ERF 1
  303. #define HAVE_FFS 1
  304. #define HAVE_FLOCK 1
  305. #define HAVE_HYPOT 1
  306. #define HAVE_ISINF 1
  307. #define HAVE_ISNAN 1
  308. #define HAVE_LGAMMA_R 1
  309. #define HAVE_MEMMOVE 1
  310. #define HAVE_NEXTAFTER 1
  311. #define HAVE_STRCHR 1
  312. #define HAVE_STRERROR 1
  313. #define HAVE_STRLCAT 1
  314. #define HAVE_STRLCPY 1
  315. #define HAVE_STRSTR 1
  316. #define HAVE_TGAMMA 1
  317. #define HAVE_SIGNBIT 1
  318. //RHO
  319. //#define HAVE_FORK 1
  320. //#define vfork fork
  321. //#define HAVE_WORKING_FORK 1
  322. //RHO
  323. //RHO by Apple's require for AppStore submit
  324. //#define HAVE___SYSCALL 1
  325. //RHO
  326. #define HAVE__LONGJMP 1
  327. #define HAVE_ATAN2L 1
  328. #define HAVE_ATAN2F 1
  329. #define HAVE_CHROOT 1
  330. //RHO - support iOS 9 and older
  331. //#define HAVE_CLOCK_GETTIME 1
  332. #define HAVE_COSH 1
  333. #define HAVE_DIRFD 1
  334. #define HAVE_DLOPEN 1
  335. //RHO
  336. //#define HAVE_DLADDR 1
  337. #define HAVE_DUP 1
  338. #define HAVE_ENDGRENT 1
  339. #define HAVE_FCHMOD 1
  340. #define HAVE_FCHOWN 1
  341. #define HAVE_FCNTL 1
  342. //RHO
  343. //#define HAVE_FDATASYNC 1
  344. //RHO
  345. #define HAVE_FGETATTRLIST 1
  346. #define HAVE_FMOD 1
  347. #define HAVE_FSYNC 1
  348. #define HAVE_FTRUNCATE 1
  349. //RHO
  350. //#define HAVE_GETATTRLIST 1
  351. //RHO
  352. #define HAVE_GETCWD 1
  353. #define HAVE_GETGRNAM 1
  354. #define HAVE_GETGRNAM_R 1
  355. #define HAVE_GETGROUPS 1
  356. #define HAVE_GETPGID 1
  357. #define HAVE_GETPGRP 1
  358. #define HAVE_GETPRIORITY 1
  359. #define HAVE_GETPWNAM_R 1
  360. #define HAVE_GETRLIMIT 1
  361. #define HAVE_GETSID 1
  362. #define HAVE_GETTIMEOFDAY 1
  363. #define HAVE_GMTIME_R 1
  364. #define HAVE_INITGROUPS 1
  365. #define HAVE_IOCTL 1
  366. #define HAVE_ISSETUGID 1
  367. #define HAVE_KILLPG 1
  368. #define HAVE_LCHMOD 1
  369. #define HAVE_LCHOWN 1
  370. #define HAVE_LINK 1
  371. #define HAVE_LLABS 1
  372. #define HAVE_LOCKF 1
  373. #define HAVE_LOG2 1
  374. #define HAVE_LSTAT 1
  375. #define HAVE_MALLOC_SIZE 1
  376. #define HAVE_MBLEN 1
  377. #define HAVE_MEMSET_S 1
  378. #define HAVE_WRITEV 1
  379. #define HAVE_MKFIFO 1
  380. #define HAVE_MKNOD 1
  381. #define HAVE_MKTIME 1
  382. #define HAVE_POLL 1
  383. #define HAVE_POSIX_MEMALIGN 1
  384. #define HAVE_PREAD 1
  385. #define HAVE_QSORT_R 1
  386. #define HAVE_READLINK 1
  387. #define HAVE_ROUND 1
  388. #define HAVE_SEEKDIR 1
  389. #define HAVE_SENDFILE 1
  390. #define HAVE_SETEGID 1
  391. #define HAVE_SETENV 1
  392. #define HAVE_SETEUID 1
  393. #define HAVE_SETGID 1
  394. #define HAVE_SETGROUPS 1
  395. #define HAVE_SETPGID 1
  396. #define HAVE_SETPGRP 1
  397. #define HAVE_SETREGID 1
  398. #define HAVE_SETREUID 1
  399. #define HAVE_SETRGID 1
  400. #define HAVE_SETRLIMIT 1
  401. #define HAVE_SETRUID 1
  402. #define HAVE_SETSID 1
  403. #define HAVE_SETUID 1
  404. #define HAVE_SHUTDOWN 1
  405. #define HAVE_SIGACTION 1
  406. #define HAVE_SIGALTSTACK 1
  407. #define HAVE_SIGPROCMASK 1
  408. #define HAVE_SINH 1
  409. #define HAVE_SYMLINK 1
  410. #define HAVE_SYSCALL 1
  411. #define HAVE_SYSCONF 1
  412. #define HAVE_TANH 1
  413. #define HAVE_TELLDIR 1
  414. #define HAVE_TIMEGM 1
  415. #define HAVE_TIMES 1
  416. #define HAVE_TRUNCATE 1
  417. #define HAVE_UNSETENV 1
  418. #define HAVE_UTIMES 1
  419. #define HAVE_WAIT4 1
  420. #define HAVE_WAITPID 1
  421. #if !defined __STDC_WANT_LIB_EXT1__
  422. #define __STDC_WANT_LIB_EXT1__ 1
  423. #endif /* !defined __STDC_WANT_LIB_EXT1__ */
  424. //RHO
  425. #if TARGET_OS_SIMULATOR
  426. #define NO_GETCWD_MALLOC 1
  427. #endif
  428. //RHO
  429. #define HAVE_BUILTIN___BUILTIN_BSWAP16 1
  430. #define HAVE_BUILTIN___BUILTIN_BSWAP32 1
  431. #define HAVE_BUILTIN___BUILTIN_BSWAP64 1
  432. #define HAVE_BUILTIN___BUILTIN_CLZ 1
  433. #define HAVE_BUILTIN___BUILTIN_CLZL 1
  434. #define HAVE_BUILTIN___BUILTIN_CLZLL 1
  435. #define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1
  436. //RHO
  437. #if TARGET_OS_SIMULATOR
  438. //fix command line build issue
  439. //#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1
  440. //#define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1
  441. #endif
  442. //RHO
  443. #define HAVE_BSD_QSORT_R 1
  444. #define ATAN2_INF_C99 1
  445. #define HAVE_CLOCK_GETRES 1
  446. #define HAVE_STRUCT_TM_TM_ZONE 1
  447. #define HAVE_TM_ZONE 1
  448. #define HAVE_STRUCT_TM_TM_GMTOFF 1
  449. #define HAVE_DAYLIGHT 1
  450. #define HAVE_VAR_TIMEZONE 1
  451. #define TYPEOF_VAR_TIMEZONE long
  452. #define HAVE_TIMEZONE 1
  453. #define TIMEZONE_VOID 1
  454. #define NEGATIVE_TIME_T 1
  455. #define LOCALTIME_OVERFLOW_PROBLEM 1
  456. #define POSIX_SIGNAL 1
  457. #define RSHIFT(x,y) ((x)>>(int)(y))
  458. #define HAVE__SC_CLK_TCK 1
  459. //RHO
  460. #if TARGET_OS_SIMULATOR
  461. #define STACK_GROW_DIRECTION -1
  462. #else
  463. #define STACK_GROW_DIRECTION 0
  464. #endif
  465. //RHO
  466. #define _REENTRANT 1
  467. #define _THREAD_SAFE 1
  468. #define HAVE_LIBPTHREAD 1
  469. #define HAVE_SCHED_YIELD 1
  470. #define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
  471. #define HAVE_PTHREAD_ATTR_GETSTACK 1
  472. #define HAVE_PTHREAD_GET_STACKADDR_NP 1
  473. #define HAVE_PTHREAD_GET_STACKSIZE_NP 1
  474. #define HAVE_PTHREAD_COND_INIT 1
  475. #define HAVE_PTHREAD_CONDATTR_INIT 1
  476. #define HAVE_PTHREAD_SIGMASK 1
  477. #define HAVE_PTHREAD_SETNAME_NP 1
  478. #define HAVE_PTHREAD_ATTR_INIT 1
  479. //RHO
  480. //#define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(name)
  481. //RHO
  482. #define UCONTEXT_IN_SIGNAL_H 1
  483. #define DEFINE_MCONTEXT_PTR(mc, uc) mcontext_t mc = (uc)->uc_mcontext
  484. //RHO by Apple's require for AppStore submit
  485. //#define HAVE_GETCONTEXT 1
  486. //#define HAVE_SETCONTEXT 1
  487. //RHO
  488. #define HAVE_BACKTRACE 1
  489. #define DLEXT_MAXLEN 3
  490. #define DLEXT ".so"
  491. //RHO
  492. //#define RUBY_SETJMP(env) __builtin_setjmp((void **)(env))
  493. //#define RUBY_LONGJMP(env,val) __builtin_longjmp((void **)(env),val)
  494. #define RUBY_SETJMP(env) _setjmp((env))
  495. #define RUBY_LONGJMP(env,val) _longjmp((env),val)
  496. //RHO
  497. #define RUBY_JMP_BUF jmp_buf
  498. #define HAVE_PTHREAD_H 1
  499. //RHO
  500. #if TARGET_OS_SIMULATOR
  501. #define RUBY_PLATFORM "x86_64-darwin"
  502. #else
  503. #define RUBY_PLATFORM "arm-darwin"
  504. #endif
  505. //#define USE_RGENGC 0
  506. #define LOAD_RELATIVE 1
  507. /*
  508. #ifndef TRUE
  509. #define TRUE 1
  510. #endif
  511. #ifndef FALSE
  512. #define FALSE 0
  513. #endif
  514. */
  515. #define _XOPEN_SOURCE
  516. #define NO_INITIAL_LOAD_PATH
  517. #define NO_RUBY_SITE_LIB
  518. #define NO_RUBY_VENDOR_LIB
  519. //RHO
  520. //RHO iOS 11
  521. #if defined(__APPLE__) && !defined(RHODES_QT_PLATFORM)
  522. #import <Availability.h>
  523. #ifdef __IPHONE_11_0
  524. #define HAVE_SPAWNV
  525. #define HAVE_FORK 1
  526. #define vfork fork
  527. #define HAVE_WORKING_FORK 1
  528. #endif
  529. #endif
  530. //RHO - for bigdecimal support
  531. #define HAVE_LABS 1
  532. #define HAVE_LLABS 1
  533. #define HAVE_RB_RATIONAL_NUM 1
  534. #define HAVE_RB_RATIONAL_DEN 1
  535. //RHO
  536. //RHO for encoding & convertors
  537. #define EXTSTATIC 1
  538. #endif /* INCLUDE_RUBY_CONFIG_H */