Use autoconf's result of AC_CHECK_SIZEOF(long) in CURL_CONFIGURE_LONG
This commit is contained in:
parent
7bdae7be4f
commit
a06e077938
36
acinclude.m4
36
acinclude.m4
@ -3646,33 +3646,11 @@ dnl The size of long is a build time characteristic and as such
|
|||||||
dnl must be recorded in curlbuild.h
|
dnl must be recorded in curlbuild.h
|
||||||
|
|
||||||
AC_DEFUN([CURL_CONFIGURE_LONG], [
|
AC_DEFUN([CURL_CONFIGURE_LONG], [
|
||||||
AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl
|
if test -z "$ac_cv_sizeof_long" ||
|
||||||
if test ! -z "$ac_cv_sizeof_long"; then
|
test "$ac_cv_sizeof_long" -eq "0"; then
|
||||||
AC_MSG_WARN([Use CURL-CONFIGURE-LONG to check the size of long first])
|
AC_MSG_ERROR([cannot find out size of long.])
|
||||||
fi
|
|
||||||
AC_MSG_CHECKING([size of long])
|
|
||||||
curl_sizeof_long="unknown"
|
|
||||||
for tmp_size in '16' '8' '4' '2' '1' ; do
|
|
||||||
if test "$curl_sizeof_long" = "unknown"; then
|
|
||||||
AC_COMPILE_IFELSE([
|
|
||||||
AC_LANG_PROGRAM([[
|
|
||||||
$curl_includes_inttypes
|
|
||||||
typedef char dummy_arr[sizeof(long) == $tmp_size ? 1 : -1];
|
|
||||||
]],[[
|
|
||||||
dummy_arr[1] = (long)1;
|
|
||||||
]])
|
|
||||||
],[
|
|
||||||
curl_sizeof_long="$tmp_size"
|
|
||||||
])
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$curl_sizeof_long" = "unknown"; then
|
|
||||||
AC_MSG_ERROR([cannot find out size of long])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([$curl_sizeof_long])
|
|
||||||
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_LONG], [$curl_sizeof_long])
|
|
||||||
ac_cv_sizeof_long="$curl_sizeof_long"
|
|
||||||
fi
|
fi
|
||||||
|
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_LONG], [$ac_cv_sizeof_long])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@ -3761,9 +3739,13 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
|
|||||||
AC_MSG_ERROR([SED not set. Cannot continue without SED being set.])
|
AC_MSG_ERROR([SED not set. Cannot continue without SED being set.])
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
CURL_CONFIGURE_LONG
|
AC_CHECK_SIZEOF(long)
|
||||||
AC_CHECK_SIZEOF(void*)
|
AC_CHECK_SIZEOF(void*)
|
||||||
#
|
#
|
||||||
|
if test -z "$ac_cv_sizeof_long" ||
|
||||||
|
test "$ac_cv_sizeof_long" -eq "0"; then
|
||||||
|
AC_MSG_ERROR([cannot find out size of long.])
|
||||||
|
fi
|
||||||
if test -z "$ac_cv_sizeof_voidp" ||
|
if test -z "$ac_cv_sizeof_voidp" ||
|
||||||
test "$ac_cv_sizeof_voidp" -eq "0"; then
|
test "$ac_cv_sizeof_voidp" -eq "0"; then
|
||||||
AC_MSG_ERROR([cannot find out size of void*.])
|
AC_MSG_ERROR([cannot find out size of void*.])
|
||||||
|
@ -1996,6 +1996,7 @@ CURL_VERIFY_RUNTIMELIBS
|
|||||||
|
|
||||||
AC_CHECK_SIZEOF(size_t)
|
AC_CHECK_SIZEOF(size_t)
|
||||||
AC_CHECK_SIZEOF(long)
|
AC_CHECK_SIZEOF(long)
|
||||||
|
CURL_CONFIGURE_LONG
|
||||||
AC_CHECK_SIZEOF(time_t)
|
AC_CHECK_SIZEOF(time_t)
|
||||||
AC_CHECK_SIZEOF(off_t)
|
AC_CHECK_SIZEOF(off_t)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user