configure: Check for a modern sched_setaffinity prototype.

This commit is contained in:
Andrew Nguyen 2011-02-22 07:10:22 -06:00 committed by Alexandre Julliard
parent 7b2604e5f9
commit 2f22a504e7
2 changed files with 43 additions and 2 deletions

35
configure vendored
View File

@ -12818,7 +12818,6 @@ for ac_func in \
pwrite \
readdir \
readlink \
sched_setaffinity \
sched_yield \
select \
setproctitle \
@ -13317,6 +13316,40 @@ $as_echo "#define HAVE_ONE_ARG_MKDIR 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_setaffinity" >&5
$as_echo_n "checking for sched_setaffinity... " >&6; }
if test "${wine_cv_have_sched_setaffinity+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _GNU_SOURCE
#include <sched.h>
int
main ()
{
sched_setaffinity(0, 0, 0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
wine_cv_have_sched_setaffinity=yes
else
wine_cv_have_sched_setaffinity=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_sched_setaffinity" >&5
$as_echo "$wine_cv_have_sched_setaffinity" >&6; }
if test "$wine_cv_have_sched_setaffinity" = "yes"
then
$as_echo "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }

View File

@ -1947,7 +1947,6 @@ AC_CHECK_FUNCS(\
pwrite \
readdir \
readlink \
sched_setaffinity \
sched_yield \
select \
setproctitle \
@ -2049,6 +2048,15 @@ then
AC_DEFINE(HAVE_ONE_ARG_MKDIR, 1, [Define if mkdir takes only one argument])
fi
AC_CACHE_CHECK([for sched_setaffinity],wine_cv_have_sched_setaffinity,
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#define _GNU_SOURCE
#include <sched.h>]], [[sched_setaffinity(0, 0, 0);]])],[wine_cv_have_sched_setaffinity=yes],[wine_cv_have_sched_setaffinity=no]))
if test "$wine_cv_have_sched_setaffinity" = "yes"
then
AC_DEFINE(HAVE_SCHED_SETAFFINITY, 1, [Define to 1 if you have the `sched_setaffinity' function.])
fi
dnl **** Check for types ****
AC_C_CONST