From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 441903858409; Mon, 11 Oct 2021 20:35:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 441903858409 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: dfe15cad5369c150f1c470bbb81c87037169a462 X-Git-Newrev: dcb1568f4a72350c9f3176d2f15d9027387e4207 Message-Id: <20211011203535.441903858409@sourceware.org> Date: Mon, 11 Oct 2021 20:35:35 +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: Mon, 11 Oct 2021 20:35:35 -0000 https://gcc.gnu.org/g:dcb1568f4a72350c9f3176d2f15d9027387e4207 commit dcb1568f4a72350c9f3176d2f15d9027387e4207 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;