[MacPorts] #64906: fixing Ruby for PowerPC

MacPorts noreply at macports.org
Thu May 12 08:10:21 UTC 2022


#64906: fixing Ruby for PowerPC
-----------------------------+-------------------------------------------
  Reporter:  barracuda156    |      Owner:  kimuraw
      Type:  defect          |     Status:  closed
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.7.2
Resolution:  wontfix         |   Keywords:  powerpc, leopard, snowleopard
      Port:  ruby27, ruby30  |
-----------------------------+-------------------------------------------

Comment (by barracuda156):

 Replying to [comment:15 kencu]:
 > Or this should work:

 No idea if that’s legit, but some software uses very simple replacements
 like
 {{{
 pid_t gettid(void) {
 #ifdef __FreeBSD__
     return (pid_t)pthread_getthreadid_np();
 #elif defined(__APPLE__)
 #if (defined __MAC_OS_X_VERSION_MIN_REQUIRED &&
 __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
     uint64_t curthreadid;
     pthread_threadid_np(NULL, &curthreadid);
     return (pid_t)curthreadid;
 #else /* __MAC_OS_X_VERSION_MIN_REQUIRED */
     return (pid_t)pthread_self;
 #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
 #else /* __APPLE__*/
     return (pid_t)syscall(SYS_gettid);
 #endif /* __FreeBSD__, __APPLE__*/
 }
 }}}

 https://cpp.hotexamples.com/examples/-/-/pthread_threadid_np/cpp-
 pthread_threadid_np-function-
 examples.html#0x1857de8803549fd096e569ca2ab8f2170f1a0b20998b8e84decbcd8f731ea7db-1118,,1132,

-- 
Ticket URL: <https://trac.macports.org/ticket/64906#comment:21>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list