From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 3298E3858439; Wed, 13 Oct 2021 08:31:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3298E3858439 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/iains/heads/d-for-darwin)] D, Darwin : Update pthreads sizes. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/iains/heads/d-for-darwin X-Git-Oldrev: 87d056bf8e69bff1fc76fcd079833014bd4f5f75 X-Git-Newrev: 71dd1368c311de2d6eda2b97ba2fe10327d4b9ef Message-Id: <20211013083110.3298E3858439@sourceware.org> Date: Wed, 13 Oct 2021 08:31:10 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2021 08:31:10 -0000 https://gcc.gnu.org/g:71dd1368c311de2d6eda2b97ba2fe10327d4b9ef commit 71dd1368c311de2d6eda2b97ba2fe10327d4b9ef Author: Iain Sandoe 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;