From b4463e8b84a227e8bbed854dcaab02aad4bd801f Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 30 Jun 2018 03:48:37 +0000 Subject: [PATCH] enhanced the __int128_t check with extra check against va_arg --- configure | 8 +++++--- configure.ac | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure b/configure index ffb3bca..6f7fa10 100755 --- a/configure +++ b/configure @@ -20395,16 +20395,18 @@ fi if test ${ac_cv_sizeof___int128_t} -gt 0 then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking __int128_t with %" >&5 -$as_echo_n "checking __int128_t with %... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking __int128_t with % and va_arg" >&5 +$as_echo_n "checking __int128_t with % and va_arg... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { volatile __int128_t x, base; + va_list ap; + va_list (ap, __int128_t); x = (__int128_t)&base; base = (__int128_t)&x; x = x % base; diff --git a/configure.ac b/configure.ac index a1a38d6..740ce67 100644 --- a/configure.ac +++ b/configure.ac @@ -394,10 +394,12 @@ dnl Changing ac_cv_sizeof___int128_t here doesn't corret SIZEOF___INT128_T dnl since it's already generated. It only affects HCL_SIZEOF___INT128_T below. if test ${ac_cv_sizeof___int128_t} -gt 0 then - AC_MSG_CHECKING([__int128_t with %]) + AC_MSG_CHECKING([__int128_t with % and va_arg]) AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], [ + [AC_LANG_PROGRAM([#include ], [ volatile __int128_t x, base; + va_list ap; + va_list (ap, __int128_t); x = (__int128_t)&base; base = (__int128_t)&x; x = x % base;