diff --git a/GMP.pro b/GMP.pro index 081814d..12fa2b9 100644 --- a/GMP.pro +++ b/GMP.pro @@ -15,8 +15,5 @@ include($$PWD/tests/test.pri) src.file = src/GMP.pro -gcc { - SUBDIRS += tests - tests.file = tests/tests.pro - -} +SUBDIRS += tests +tests.file = tests/tests.pro diff --git a/src/mini-gmp.h b/src/mini-gmp.h index 25791cd..c72f086 100644 --- a/src/mini-gmp.h +++ b/src/mini-gmp.h @@ -53,8 +53,8 @@ void mp_get_memory_functions (void *(**) (size_t), void *(**) (void *, size_t, size_t), void (**) (void *, size_t)); -typedef unsigned long uIntMpz; -typedef long intMpz; +typedef unsigned long long uIntMpz; +typedef long long intMpz; typedef uIntMpz mp_limb_t; typedef intMpz mp_size_t; diff --git a/tests/tst_arithmetictests.cpp b/tests/tst_arithmetictests.cpp index 1f7750f..5d9bc42 100644 --- a/tests/tst_arithmetictests.cpp +++ b/tests/tst_arithmetictests.cpp @@ -739,22 +739,22 @@ void arithmetictests::testOperators() { QVERIFY(num1.sizeBytes() == 0); num1 = 1; - QVERIFY(num1.sizeBytes() == sizeof (long)); + QVERIFY(num1.sizeBytes() == sizeof (intMpz)); num1++; - QVERIFY(num1.sizeBytes() == sizeof (long)); + QVERIFY(num1.sizeBytes() == sizeof (intMpz)); num1+= 0xFF; - QVERIFY(num1.sizeBytes() == sizeof (long)); + QVERIFY(num1.sizeBytes() == sizeof (intMpz)); - num1 += std::numeric_limits::max(); - num1 += std::numeric_limits::max(); + num1 += std::numeric_limits::max(); + num1 += std::numeric_limits::max(); - QVERIFY(num1.sizeBytes() == sizeof (long) * 2); + QVERIFY(num1.sizeBytes() == sizeof (intMpz) * 2); num1 = 1; - QVERIFY(num1.sizeBytes() == sizeof (long)); - QVERIFY(num1.sizeType() == sizeof (long) * 2); + QVERIFY(num1.sizeBytes() == sizeof (intMpz)); + QVERIFY(num1.sizeType() == sizeof (intMpz) * 2); }