Commit 2ff1ec21 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use autoconf AC_C_RESTRICT rather than ours

parent 8a9791f4
dnl AC_C_RESTRICT
dnl Do nothing if the compiler accepts the restrict keyword.
dnl Otherwise define restrict to __restrict__ or __restrict if one of
dnl those work, otherwise define restrict to be empty.
AC_DEFUN([AC_C_RESTRICT],
[AC_MSG_CHECKING([for restrict])
ac_cv_c_restrict=no
for ac_kw in restrict __restrict__ __restrict; do
AC_TRY_COMPILE([],[char * $ac_kw p;],[ac_cv_c_restrict=$ac_kw; break])
done
AC_MSG_RESULT([$ac_cv_c_restrict])
case $ac_cv_c_restrict in
restrict) ;;
no) AC_DEFINE([restrict],,
[Define as `__restrict' if that's what the C compiler calls
it, or to nothing if it is not supported.]) ;;
*) AC_DEFINE_UNQUOTED([restrict],$ac_cv_c_restrict) ;;
esac])
dnl AC_C_BUILTIN_EXPECT
dnl Check whether compiler understands __builtin_expect.
AC_DEFUN([AC_C_BUILTIN_EXPECT],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment