mpers.m4: check for size of long and kernel_long_t

The primary purpose of this new check is diagnostics.

* m4/mpers.m4 (st_MPERS): Check for size of long and kernel_long_t.
This commit is contained in:
Дмитрий Левин 2017-11-06 19:21:58 +00:00
parent 04a65a183b
commit 9517cfa996

View File

@ -126,6 +126,23 @@ case "$arch" in
[Define to 1 if you have CFLAG mpers support]) [Define to 1 if you have CFLAG mpers support])
st_MPERS_STRUCT_STAT([]) st_MPERS_STRUCT_STAT([])
st_MPERS_STRUCT_STAT([64]) st_MPERS_STRUCT_STAT([64])
if test $st_cv_runtime = yes; then
pushdef([SIZEOF_LONG],
MPERS_NAME[_SIZEOF_LONG])
st_MPERS_LOAD_AC_CV([sizeof_long])
AC_CHECK_SIZEOF([long])
st_MPERS_SAVE_AC_CV([sizeof_long])
popdef([SIZEOF_LONG])
pushdef([SIZEOF_KERNEL_LONG_T],
MPERS_NAME[_SIZEOF_KERNEL_LONG_T])
st_MPERS_LOAD_AC_CV([sizeof_kernel_long_t])
AC_CHECK_SIZEOF([kernel_long_t],,
[#include "$srcdir/kernel_types.h"])
st_MPERS_SAVE_AC_CV([sizeof_kernel_long_t])
popdef([SIZEOF_KERNEL_LONG_T])
fi
fi fi
fi fi
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"