When looking for a thread library, check using pthread_create, not

pthread_join.
This commit is contained in:
joerg 2013-04-30 22:28:22 +00:00
parent 5d4c49e51e
commit c036189d4f
2 changed files with 75 additions and 1 deletions

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.22 2012/03/06 23:38:04 joerg Exp $
$NetBSD: distinfo,v 1.23 2013/04/30 22:28:22 joerg Exp $
SHA1 (coreutils-8.13.tar.gz) = 83b7e25661c439ecac55e99ff0dd816b9ff478a5
RMD160 (coreutils-8.13.tar.gz) = fb24a15641581ba57482f4c1c1ecfc32752dbd9d
Size (coreutils-8.13.tar.gz) = 11660808 bytes
SHA1 (patch-configure) = bfe96fde14c73b2836f539cc2e9dad3a77b05c4b
SHA1 (patch-lib-fflush.c) = e52e0da2127c5debbb14e967b1e206226efdaa4a
SHA1 (patch-lib-fseeko.c) = ab62b8c7faa9a601191475c040c7466e1bd52fe1

View file

@ -0,0 +1,73 @@
$NetBSD: patch-configure,v 1.1 2013/04/30 22:28:22 joerg Exp $
--- configure.orig 2013-04-30 19:22:56.000000000 +0000
+++ configure
@@ -38704,30 +38704,30 @@ fi
LIB_PTHREAD=
if test $ac_cv_header_pthread_h = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5
-$as_echo_n "checking for library containing pthread_join... " >&6; }
-if ${gl_cv_search_pthread_join+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
+$as_echo_n "checking for library containing pthread_create... " >&6; }
+if ${gl_cv_search_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
gl_saved_libs="$LIBS"
- gl_cv_search_pthread_join=
+ gl_cv_search_pthread_create=
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
main ()
{
-pthread_join (pthread_self (), (void **) 0);
+pthread_create (NULL, NULL, NULL, NULL);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- gl_cv_search_pthread_join="none required"
+ gl_cv_search_pthread_create="none required"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- if test -z "$gl_cv_search_pthread_join"; then
+ if test -z "$gl_cv_search_pthread_create"; then
LIBS="-lpthread $gl_saved_libs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -38735,13 +38735,13 @@ rm -f core conftest.err conftest.$ac_obj
int
main ()
{
-pthread_join (pthread_self (), (void **) 0);
+pthread_create (NULL, NULL, NULL, NULL);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- gl_cv_search_pthread_join="-lpthread"
+ gl_cv_search_pthread_create="-lpthread"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -38749,10 +38749,10 @@ rm -f core conftest.err conftest.$ac_obj
LIBS="$gl_saved_libs"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_search_pthread_join" >&5
-$as_echo "$gl_cv_search_pthread_join" >&6; }
- if test "$gl_cv_search_pthread_join" != "none required"; then
- LIB_PTHREAD="$gl_cv_search_pthread_join"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_search_pthread_create" >&5
+$as_echo "$gl_cv_search_pthread_create" >&6; }
+ if test "$gl_cv_search_pthread_create" != "none required"; then
+ LIB_PTHREAD="$gl_cv_search_pthread_create"
fi
fi