[gcc(refs/users/ibuclaw/heads/darwin)] D, Darwin : Update pthreads sizes.
Iain Buclaw
ibuclaw@gcc.gnu.org
Sun Mar 14 22:01:31 GMT 2021
https://gcc.gnu.org/g:3c0c8df9e737542ffb0074967ff9536a2df11863
commit 3c0c8df9e737542ffb0074967ff9536a2df11863
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Fri Dec 11 00:37:57 2020 +0000
D, Darwin : Update pthreads sizes.
The size of struct pthread changed at Darwin14 (macOS 10.10).
Update the type bindings accordingly.
libphobos/ChangeLog:
* libdruntime/core/sys/posix/sys/types.d: Update sizes after
macOS 10.10.
Diff:
---
libphobos/libdruntime/core/sys/posix/sys/types.d | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/types.d b/libphobos/libdruntime/core/sys/posix/sys/types.d
index abcea99019f..5ff9be4e1a5 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/types.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/types.d
@@ -899,9 +899,13 @@ else version (CRuntime_Musl)
}
else version (Darwin)
{
+ import core.sys.darwin.config;
version (D_LP64)
{
- enum __PTHREAD_SIZE__ = 8176;
+ static if (__traits(getTargetInfo, "osxVersionMin") >= __MAC_10_10)
+ enum __PTHREAD_SIZE__ = 8176;
+ else
+ enum __PTHREAD_SIZE__ = 1168;
enum __PTHREAD_ATTR_SIZE__ = 56;
enum __PTHREAD_MUTEXATTR_SIZE__ = 8;
enum __PTHREAD_MUTEX_SIZE__ = 56;
@@ -913,7 +917,10 @@ else version (Darwin)
}
else
{
- enum __PTHREAD_SIZE__ = 4088;
+ static if (__traits(getTargetInfo, "osxVersionMin") >= __MAC_10_10)
+ enum __PTHREAD_SIZE__ = 4088;
+ else
+ enum __PTHREAD_SIZE__ = 596;
enum __PTHREAD_ATTR_SIZE__ = 36;
enum __PTHREAD_MUTEXATTR_SIZE__ = 8;
enum __PTHREAD_MUTEX_SIZE__ = 40;
More information about the Gcc-cvs
mailing list