mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Protect call to pthread_condattr_setclock with define.
While here update pthread_attr_setstacksize test to use AC_LINK_IFELSE and avoid an unused variable in glib/tests/thread.c. https://bugzilla.gnome.org/show_bug.cgi?id=667790
This commit is contained in:
committed by
Matthias Clasen
parent
6d9f874330
commit
decac50c15
22
configure.ac
22
configure.ac
@@ -2238,11 +2238,23 @@ if test x"$have_threads" = xposix; then
|
||||
# This is not AC_CHECK_FUNC to also work with function
|
||||
# name mangling in header files.
|
||||
AC_MSG_CHECKING(for pthread_attr_setstacksize)
|
||||
AC_TRY_LINK([#include <pthread.h>],
|
||||
[pthread_attr_t t; pthread_attr_setstacksize(&t,0)],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE,1,[Have function pthread_attr_setstacksize])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <pthread.h>],
|
||||
[pthread_attr_t t; pthread_attr_setstacksize(&t,0)])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE,1,
|
||||
[Have function pthread_attr_setstacksize])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
AC_MSG_CHECKING(for pthread_condattr_setclock)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <pthread.h>],
|
||||
[pthread_condattr_t a; pthread_condattr_setclock(&a,0)])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_PTHREAD_CONDATTR_SETCLOCK,1,
|
||||
[Have function pthread_condattr_setclock])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
CPPFLAGS="$glib_save_CPPFLAGS"
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user