autoconf: look for _Decltype as yet another alias for typeof().

If the past is any indication, the final standardization of typeof()
probably will be _Decltype().

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2020-07-16 20:26:58 -07:00
parent 271dc7a7f7
commit 36814f1fc8

View File

@ -7,7 +7,7 @@ dnl --------------------------------------------------------------------------
AC_DEFUN([PA_C_TYPEOF],
[AC_CACHE_CHECK([if $CC supports typeof], [pa_cv_typeof],
[pa_cv_typeof=no
for pa_typeof_try in typeof __typeof __typeof__ decltype __decltype __decltype__
for pa_typeof_try in typeof __typeof __typeof__ decltype __decltype __decltype__ _Decltype
do
AS_IF([test $pa_cv_typeof = no],
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
@ -29,4 +29,4 @@ int testme(int x)
AS_IF([test $pa_cv_typeof = typeof],
[],
[AC_DEFINE_UNQUOTED([typeof], [$pa_cv_typeof],
[Define if your typeof operator is not named typeof.])])])])
[Define if your typeof operator is not named `typeof'.])])])])