summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-11 12:40:14 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-11 12:51:00 +0200
commiteb067389c5d9b031e50b849b73a22b0a0aab7a09 (patch)
tree017aa4cd10fe42bd5332eaf99c79195fd71daf37
parentefd53706481a717ae60f4c845ecfcb19573bacfb (diff)
downloadgnutls-tmp-added-x86-build.tar.gz
tests: improved detection of 64-bit systemstmp-added-x86-build
We now use the ${ac_cv_sizeof_unsigned_long_int} variable which gives the numbers used in the host system, not the build one. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--configure.ac3
-rw-r--r--tests/cert-tests/Makefile.am1
-rwxr-xr-xtests/cert-tests/template-test5
3 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 505b911de2..bce0d9f7ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -698,6 +698,9 @@ AC_CHECK_TYPE(ssize_t,
AC_CHECK_SIZEOF(unsigned long int, 4)
AC_CHECK_SIZEOF(unsigned int, 4)
+# export for use in scripts
+AC_SUBST(ac_cv_sizeof_unsigned_long_int)
+
AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index c04b42685f..82a837b2af 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -110,6 +110,7 @@ TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
VALGRIND="$(VALGRIND)" \
LIBTOOL="$(LIBTOOL)" \
top_builddir="$(top_builddir)" \
+ ac_cv_sizeof_unsigned_long_int="$(ac_cv_sizeof_unsigned_long_int)" \
ASAN_OPTIONS="detect_leaks=0:exitcode=6" \
srcdir="$(srcdir)"
diff --git a/tests/cert-tests/template-test b/tests/cert-tests/template-test
index 7d3d4f4e17..d2a5f9d683 100755
--- a/tests/cert-tests/template-test
+++ b/tests/cert-tests/template-test
@@ -21,6 +21,7 @@
#set -e
srcdir="${srcdir:-.}"
+ac_cv_sizeof_unsigned_long_int="${ac_cv_sizeof_unsigned_long_int:-8}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
DIFF="${DIFF:-diff}"
@@ -122,7 +123,7 @@ fi
rm -f ${TMPFILE}
# The following test works in 64-bit systems
-if test "$(getconf LONG_BIT)" = "64"; then
+if test "${ac_cv_sizeof_unsigned_long_int}" = 8;then
datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
@@ -180,7 +181,7 @@ rm -f ${TMPFILE}
# Test the GeneralizedTime support
-if test "$(getconf LONG_BIT)" = "64"; then
+if test "${ac_cv_sizeof_unsigned_long_int}" = 8;then
# we should test that on systems which have 64-bit time_t.
datefudge -s "2051-04-22" \
"${CERTTOOL}" --generate-self-signed \