Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e126233

Browse files
committed
Poke-and-hope attempt to fix Bugs #115006 and #114324: fix the test
for pthread_t (to calculate its size) to work even if pthread_t is a struct.
1 parent d9a8dec commit e126233

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22

3-
# From configure.in Revision: 1.161
3+
# From configure.in Revision: 1.162
44

55
# Guess values for system-dependent variables and create Makefiles.
66
# Generated automatically using autoconf version 2.13
@@ -769,7 +769,7 @@ else
769769
fi
770770

771771
echo "$ac_t""$with_cxx" 1>&6
772-
SET_CXX="CXX = $CXX"
772+
SET_CXX="CXX=$CXX"
773773

774774
#AC_MSG_CHECKING(CCC)
775775
#if test -z "$CCC"
@@ -2522,7 +2522,7 @@ cat > conftest.$ac_ext <<EOF
25222522
#include "confdefs.h"
25232523
#include <pthread.h>
25242524
int main() {
2525-
pthread_t x; x = (pthread_t)0;
2525+
pthread_t x; x = *(pthread_t)*0;
25262526
; return 0; }
25272527
EOF
25282528
if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then

configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ AC_ARG_WITH(cxx, [ --with-cxx=<compiler> enable C++ support],[
170170
with_cxx=no
171171
])
172172
AC_MSG_RESULT($with_cxx)
173-
SET_CXX="CXX = $CXX"
173+
SET_CXX="CXX=$CXX"
174174

175175
#AC_MSG_CHECKING(CCC)
176176
#if test -z "$CCC"
@@ -477,7 +477,7 @@ AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t)
477477
# if have pthread_t then define SIZEOF_PTHREAD_T
478478
AC_MSG_CHECKING(for pthread_t)
479479
have_pthread_t=no
480-
AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = (pthread_t)0;], have_pthread_t=yes)
480+
AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t)*0;], have_pthread_t=yes)
481481
AC_MSG_RESULT($have_pthread_t)
482482
if test "$have_pthread_t" = yes ; then
483483
# AC_CHECK_SIZEOF() doesn't include <pthread.h>.

0 commit comments

Comments
 (0)