From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1873) id DC8AD3A0702D; Sat, 10 Apr 2021 17:01:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC8AD3A0702D Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Iain Buclaw To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/ibuclaw/heads/darwin)] D, Darwin : Update pthreads sizes. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/ibuclaw/heads/darwin X-Git-Oldrev: 2cea3b3404b7ead3e8d0be6a774ff5c3b87c29a8 X-Git-Newrev: 00bfb94e5b1d3db52171a9445c8db7ef5e155c89 Message-Id: <20210410170147.DC8AD3A0702D@sourceware.org> Date: Sat, 10 Apr 2021 17:01:47 +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: Sat, 10 Apr 2021 17:01:48 -0000 https://gcc.gnu.org/g:00bfb94e5b1d3db52171a9445c8db7ef5e155c89 commit 00bfb94e5b1d3db52171a9445c8db7ef5e155c89 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;