<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/91869a423cf6d0f6d71ee5ae4265cd3bab2df136">https://github.com/macports/macports-ports/commit/91869a423cf6d0f6d71ee5ae4265cd3bab2df136</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 91869a423cf libocca: update to 2.0.0
</span>91869a423cf is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 91869a423cf6d0f6d71ee5ae4265cd3bab2df136
</span>Author: Sergey Fedorov <barracuda@macos-powerpc.org>
AuthorDate: Sat Jul 27 20:59:16 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> libocca: update to 2.0.0
</span>---
devel/libocca/Portfile | 36 ++++++++++------------
...-sys.cpp-add-missing-AvailabilityMacros.h.patch | 21 -------------
...-sys.cpp-fix-macOS-without-breaking-Linux.patch | 36 ++++++++++++++++++++++
...use-clock_gettime-on-macOS-when-supported.patch | 31 -------------------
...pp-update-pthread_threadid-code-for-macOS.patch | 30 ------------------
5 files changed, 53 insertions(+), 101 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libocca/Portfile b/devel/libocca/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index fbce9096a15..14e6be732ca 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libocca/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libocca/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -9,9 +9,9 @@ PortGroup legacysupport 1.1
</span> # getline
legacysupport.newest_darwin_requires_legacy 10
<span style='display:block; white-space:pre;background:#ffe0e0;'>-github.setup libocca occa 1.6.0 v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup libocca occa 2.0.0 v
</span> name libocca
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span> categories devel parallel
license BSD
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -21,9 +21,9 @@ long_description OCCA is an open source, portable and vendor-neutral framewor
</span> concepts — such as a device, memory or kernel — while the OCCA Kernel Language (OKL) \
enables the creation of portable device kernels using a directive-based extension to the C language.
homepage htpps://libocca.org
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 74974bd170d9cf9b9dfe178a78d168cda6451d7e \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 b863a24171000097121aff5c43dadf22416c143824598a51c653689fd917794f \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 1131891
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 5ef013688aed5e47fec8217d73d07a51472412c3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 f2521901fed5d199193d54c7db4186479a974bdae92ac97779c47fa2bb68badd \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 1142694
</span> github.tarball_from archive
compiler.c_standard 2011
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,10 +34,8 @@ compilers.setup require_fortran
</span> # By default it installs into a weird location:
patchfiles-append 0001-CMakeLists-fix-install-paths.patch
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Drop once this is merged: https://github.com/libocca/occa/pull/739
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles-append 0002-sys.cpp-add-missing-AvailabilityMacros.h.patch \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 0003-sys.cpp-use-clock_gettime-on-macOS-when-supported.patch \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 0004-sys.cpp-update-pthread_threadid-code-for-macOS.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/libocca/occa/commit/c0c601f80eff8f4eb7cc453a6a9db5bdd6554495
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append 0002-sys.cpp-fix-macOS-without-breaking-Linux.patch
</span>
post-patch {
reinplace "s,@DESTROOTDIR@,${destroot}${prefix}," ${worksrcpath}/CMakeLists.txt
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -53,14 +51,14 @@ pre-configure {
</span> }
configure.args-append \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_FORTRAN=ON \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_OPENMP=ON \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_CUDA=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_DPCPP=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_EXAMPLES=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_HIP=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_METAL=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_TESTS=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_FORTRAN=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_OPENMP=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_CUDA=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_DPCPP=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_EXAMPLES=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_HIP=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_METAL=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_TESTS=OFF
</span>
if {[string match *clang* ${configure.compiler}]} {
configure.ldflags-append \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -75,7 +73,7 @@ if {${configure.cxx_stdlib} eq "libc++"} {
</span>
if {${os.platform} eq "darwin" && ${os.major} < 11} {
configure.args-append \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_OPENCL=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_OPENCL=OFF
</span> }
pre-destroot {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -89,7 +87,7 @@ variant tests description "Build tests" {
</span> -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
configure.args-replace \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DENABLE_TESTS=OFF -DENABLE_TESTS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOCCA_ENABLE_TESTS=OFF -DOCCA_ENABLE_TESTS=ON
</span> test.run yes
test.cmd ctest
test.env-append OCCA_CC=${configure.cc} \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libocca/files/0002-sys.cpp-add-missing-AvailabilityMacros.h.patch b/devel/libocca/files/0002-sys.cpp-add-missing-AvailabilityMacros.h.patch
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 744e083376c..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libocca/files/0002-sys.cpp-add-missing-AvailabilityMacros.h.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,21 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From 8dac9813b33ce2f4717b0a9df42b306d00987e27 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Date: Fri, 2 Feb 2024 13:41:22 +0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Subject: [PATCH] sys.cpp: add missing AvailabilityMacros.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>----
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- src/occa/internal/utils/sys.cpp | 1 +
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 1 file changed, 1 insertion(+)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git src/occa/internal/utils/sys.cpp src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index 01d6b0ed..e1e3722b 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -19,6 +19,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <errno.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <sys/sysinfo.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # else // OCCA_MACOS_OS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <mach/mach_host.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # ifdef __clang__
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <CoreServices/CoreServices.h>
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libocca/files/0002-sys.cpp-fix-macOS-without-breaking-Linux.patch b/devel/libocca/files/0002-sys.cpp-fix-macOS-without-breaking-Linux.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..223906e8670
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libocca/files/0002-sys.cpp-fix-macOS-without-breaking-Linux.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,36 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 8f14d575640cfa0f5662c6b6ab03ff6e0e129116 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: barracuda156 <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 4 Jun 2024 15:11:10 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] sys.cpp: fix macOS without breaking Linux
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/occa/internal/utils/sys.cpp | 16 +++++++++++-----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 11 insertions(+), 5 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/occa/internal/utils/sys.cpp src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1701ecb6..7c303fd7 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -402,11 +402,17 @@ namespace occa {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int getTID() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if (OCCA_OS & (OCCA_LINUX_OS | OCCA_MACOS_OS))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if OCCA_OS == OCCA_MACOS_OS & (MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- uint64_t tid64;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- pthread_threadid_np(nullptr, &tid64);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- pid_t tid = (pid_t)tid64;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (OCCA_OS == OCCA_MACOS_OS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // pthread_threadid_np is hidden for ppc in Libc of 10.6.8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 && !defined(__ppc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint64_t tid64;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pthread_threadid_np(nullptr, &tid64);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pid_t tid = (pid_t)tid64;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ uint64_t tid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tid = pthread_mach_thread_np(pthread_self());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else // Linux
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pid_t tid = syscall(SYS_gettid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return tid;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libocca/files/0003-sys.cpp-use-clock_gettime-on-macOS-when-supported.patch b/devel/libocca/files/0003-sys.cpp-use-clock_gettime-on-macOS-when-supported.patch
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 9ef471e18fa..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libocca/files/0003-sys.cpp-use-clock_gettime-on-macOS-when-supported.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,31 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From e93734170303080330cda549d8f547496c8f5048 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Date: Fri, 2 Feb 2024 14:36:27 +0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Subject: [PATCH] sys.cpp: use clock_gettime on macOS when supported
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>----
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- src/occa/internal/utils/sys.cpp | 4 ++--
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 1 file changed, 2 insertions(+), 2 deletions(-)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git src/occa/internal/utils/sys.cpp src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index e1e3722b..dbaf3212 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -21,7 +21,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # else // OCCA_MACOS_OS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <mach/mach_host.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--# ifdef __clang__
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <CoreServices/CoreServices.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # include <mach/mach_time.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -83,7 +83,7 @@ namespace occa {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return (double) (ct.tv_sec + (1.0e-9 * ct.tv_nsec));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #elif (OCCA_OS == OCCA_MACOS_OS)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--# if defined __clang__ && defined CLOCK_UPTIME_RAW
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- uint64_t nanoseconds = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return 1.0e-9 * nanoseconds;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libocca/files/0004-sys.cpp-update-pthread_threadid-code-for-macOS.patch b/devel/libocca/files/0004-sys.cpp-update-pthread_threadid-code-for-macOS.patch
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 3fd9d70617f..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libocca/files/0004-sys.cpp-update-pthread_threadid-code-for-macOS.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,30 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From edcd035130c5924d284dff1e8915b776be6dd586 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Date: Fri, 2 Feb 2024 14:39:29 +0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Subject: [PATCH] sys.cpp: update pthread_threadid code for macOS
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>----
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- src/occa/internal/utils/sys.cpp | 7 ++++---
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 1 file changed, 4 insertions(+), 3 deletions(-)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git src/occa/internal/utils/sys.cpp src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index dbaf3212..46273aec 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/occa/internal/utils/sys.cpp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -402,12 +402,13 @@ namespace occa {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- int getTID() {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #if (OCCA_OS & (OCCA_LINUX_OS | OCCA_MACOS_OS))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#if OCCA_OS == OCCA_MACOS_OS & (MAC_OS_X_VERSION_MAX_ALLOWED >= 101200)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#if OCCA_OS == OCCA_MACOS_OS & (MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- uint64_t tid64;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- pthread_threadid_np(NULL, &tid64);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ pthread_threadid_np(nullptr, &tid64);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pid_t tid = (pid_t)tid64;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #else
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- pid_t tid = syscall(SYS_gettid);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ uint64_t tid;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ tid = pthread_mach_thread_np(pthread_self());
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return tid;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #else
</span></pre><pre style='margin:0'>
</pre>