From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1873) id 873593857823; Sat, 30 Jan 2021 19:09:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 873593857823 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: 64dc6e023f28f216df43ef8e51b69b737000d261 X-Git-Newrev: 54fa2ee5a7776bc8b3da19ee04a706652993e9cb Message-Id: <20210130190940.873593857823@sourceware.org> Date: Sat, 30 Jan 2021 19:09:40 +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, 30 Jan 2021 19:09:40 -0000 https://gcc.gnu.org/g:54fa2ee5a7776bc8b3da19ee04a706652993e9cb commit 54fa2ee5a7776bc8b3da19ee04a706652993e9cb 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 8e84ddb4c60..2ee355be82f 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;