Annotation of pkgsrc/lang/python310/patches/patch-Python_thread__pthread.h, revision 1.3

1.3     ! nia         1: $NetBSD: patch-Python_thread__pthread.h,v 1.2 2021/12/11 10:40:58 wiz Exp $
1.2       wiz         2: 
                      3: https://bugs.python.org/issue46045
1.3     ! nia         4: https://trac.macports.org/ticket/59772
1.1       adam        5: 
1.3     ! nia         6: --- Python/thread_pthread.h.orig       2023-08-24 12:46:25.000000000 +0000
1.1       adam        7: +++ Python/thread_pthread.h
1.3     ! nia         8: @@ -81,6 +81,9 @@
1.1       adam        9:     we need to add 0 to make it work there as well. */
                     10:  #if (_POSIX_SEMAPHORES+0) == -1
                     11:  #define HAVE_BROKEN_POSIX_SEMAPHORES
                     12: +#elif defined(__NetBSD__)
                     13: +/* XXX accesses to closed file descriptors, needs debugging */
                     14: +#define HAVE_BROKEN_POSIX_SEMAPHORES
                     15:  #else
                     16:  #include <semaphore.h>
                     17:  #include <errno.h>
1.3     ! nia        18: @@ -343,7 +346,17 @@ PyThread_get_thread_native_id(void)
        !            19:          PyThread_init_thread();
        !            20:  #ifdef __APPLE__
        !            21:      uint64_t native_id;
        !            22: +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
        !            23: +    native_id = pthread_mach_thread_np(pthread_self());
        !            24: +#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
        !            25: +    if (&pthread_threadid_np != NULL) {
        !            26: +        (void) pthread_threadid_np(NULL, &native_id);
        !            27: +    } else {
        !            28: +        native_id = pthread_mach_thread_np(pthread_self());
        !            29: +    }
        !            30: +#else
        !            31:      (void) pthread_threadid_np(NULL, &native_id);
        !            32: +#endif
        !            33:  #elif defined(__linux__)
        !            34:      pid_t native_id;
        !            35:      native_id = syscall(SYS_gettid);

CVSweb <webmaster@jp.NetBSD.org>