[MacPorts] #64906: fixing Ruby for PowerPC

MacPorts noreply at macports.org
Sat Apr 16 02:53:05 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 kencu):

 Or this should work:
 {{{
 #if defined(RB_THREAD_T_HAS_NATIVE_ID) || defined(__APPLE__)
 static VALUE
 native_thread_native_thread_id(rb_thread_t *target_th)
 {
 #ifdef RB_THREAD_T_HAS_NATIVE_ID
     int tid = target_th->tid;
     if (tid == 0) return Qnil;
     return INT2FIX(tid);
 #elif defined(__APPLE__)

 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1050
     uint64_t tid;
     int e = pthread_threadid_np(target_th->thread_id, &tid);
     if (e != 0) rb_syserr_fail(e, "pthread_threadid_np");
     return ULL2NUM((unsigned long long)tid);
 #else
     uint64_t tid;
     tid = pthread_mach_thread_np(pthread_self());
 #endif

 #endif
 }
 # define USE_NATIVE_THREAD_NATIVE_THREAD_ID 1
 #else
 # define USE_NATIVE_THREAD_NATIVE_THREAD_ID 0
 #endif
 }}}

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


More information about the macports-tickets mailing list