mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 04:00:26 +02:00
Added check that defines PTHREAD_ATTR_GETSTACK_WORKS when
pthread_attr_getstack works for the main thread.
This commit is contained in:
parent
1e85890c0e
commit
d48f1dffa7
2 changed files with 44 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-03-26 Marius Vollmer <mvo@zagadka.de>
|
||||
|
||||
* configure.in: Added check that defines
|
||||
PTHREAD_ATTR_GETSTACK_WORKS when pthread_attr_getstack works for
|
||||
the main thread.
|
||||
|
||||
2006-02-26 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* configure.in (AC_CHECK_FUNCS): Add dirfd.
|
||||
|
|
38
configure.in
38
configure.in
|
@ -1026,6 +1026,44 @@ esac
|
|||
AC_MSG_CHECKING(what kind of threads to support)
|
||||
AC_MSG_RESULT($with_threads)
|
||||
|
||||
## Check whether pthread_attr_getstack works for the main thread
|
||||
|
||||
AC_MSG_CHECKING(whether pthread_attr_getstack works for the main thread)
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
#if HAVE_PTHREAD_ATTR_GETSTACK
|
||||
#include <pthread.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
void *start, *end;
|
||||
size_t size;
|
||||
|
||||
pthread_getattr_np (pthread_self (), &attr);
|
||||
pthread_attr_getstack (&attr, &start, &size);
|
||||
end = (char *)start + size;
|
||||
|
||||
if ((void *)&attr < start || (void *)&attr >= end)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int main ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
],
|
||||
[works=yes
|
||||
AC_DEFINE(PTHREAD_ATTR_GETSTACK_WORKS, [1], [Define when pthread_att_get_stack works for the main thread])],
|
||||
[works=no])
|
||||
CFLAGS="$old_CFLAGS"
|
||||
AC_MSG_RESULT($works)
|
||||
|
||||
## Cross building
|
||||
if test "$cross_compiling" = "yes"; then
|
||||
AC_MSG_CHECKING(cc for build)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue