forked from enlightenment/efl
autotools: check for sched_getcpu()
sched_getcpu() is glibc-only, so not portable. Mac OS X does not have it, and has no obvious replacement function. This commit will allow future code to test for the existence of this function, to provide fallbacks instead of making compilation fail.
This commit is contained in:
parent
fc74475415
commit
9e761c9515
|
@ -649,7 +649,7 @@ pause \
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
AC_FUNC_MMAP
|
AC_FUNC_MMAP
|
||||||
|
|
||||||
EFL_CHECK_FUNCS([EFLALL], [fnmatch gettimeofday dirfd fcntl])
|
EFL_CHECK_FUNCS([EFLALL], [fnmatch gettimeofday dirfd fcntl sched_getcpu])
|
||||||
|
|
||||||
have_atfile_source="${ac_cv_func_fstatat}"
|
have_atfile_source="${ac_cv_func_fstatat}"
|
||||||
AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
|
AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
|
||||||
|
|
|
@ -172,6 +172,15 @@ case "$host_os" in
|
||||||
esac
|
esac
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl _EFL_CHECK_FUNC_SCHED_GETCPU is for internal use
|
||||||
|
dnl _EFL_CHECK_FUNC_SCHED_GETCPU(EFL, VARIABLE)
|
||||||
|
AC_DEFUN([_EFL_CHECK_FUNC_SCHED_GETCPU],
|
||||||
|
[
|
||||||
|
EFL_CHECK_LIB_CODE([$1], [], [$2], [[
|
||||||
|
#include <sched.h>
|
||||||
|
]], [[int cpu = sched_getcpu();]])
|
||||||
|
])
|
||||||
|
|
||||||
dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use
|
dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use
|
||||||
dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, VARIABLE)
|
dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, VARIABLE)
|
||||||
AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY],
|
AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY],
|
||||||
|
|
Loading…
Reference in New Issue