From f8684207257cdcb21c9e8a13ec9036d9b7d77f1e Mon Sep 17 00:00:00 2001 From: Emil Rosenquist <37864286+EmilRosenquist@users.noreply.github.com> Date: Wed, 7 Sep 2022 08:25:43 +0200 Subject: [PATCH] Use size of pointer as size of pthread_t in SIZEOF_PTHREAD_T (GH PR #48) --- .../autoconf/checks/SIZEOF_PTHREAD_T.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_PTHREAD_T.h b/libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_PTHREAD_T.h index 1bedc6c..c3929bf 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_PTHREAD_T.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_PTHREAD_T.h @@ -2,14 +2,12 @@ #undef SIZEOF_PTHREAD_T -#ifndef _WIN32 -# if defined(__APPLE__) -# ifdef __LP64__ -# define SIZEOF_PTHREAD_T 8 -# else -# define SIZEOF_PTHREAD_T 4 -# endif -# else -# define SIZEOF_PTHREAD_T 4 -# endif +#ifndef _MSC_VER +# ifdef __SIZEOF_POINTER__ +# define SIZEOF_PTHREAD_T __SIZEOF_POINTER__ +# endif + +# ifndef SIZEOF_PTHREAD_T +# error unable to determine size of pthread_t +# endif #endif