summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Enge <andreas.enge@inria.fr>2012-07-05 08:20:05 +0000
committerAndreas Enge <andreas.enge@inria.fr>2012-07-05 08:20:05 +0000
commitb4179b1c11e5c602e9add9011ec62622c070c910 (patch)
treef2f7d1afc36ceed2c3b71ac89d06c2dd8c3ebaaf
parent9de521f5cb4c15082358ca585d52296a16edc2d6 (diff)
downloadmpc-git-b4179b1c11e5c602e9add9011ec62622c070c910.tar.gz
mpc-tests.h, tfma.c, tmul.c: small changes to allow compilation with c++
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/mpc/trunk@1222 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--tests/mpc-tests.h6
-rw-r--r--tests/tfma.c2
-rw-r--r--tests/tmul.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/tests/mpc-tests.h b/tests/mpc-tests.h
index 74e5fa4..d1ce586 100644
--- a/tests/mpc-tests.h
+++ b/tests/mpc-tests.h
@@ -43,9 +43,15 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
} \
} while (0)
+#if defined (__cplusplus)
+extern "C" {
+#endif
__MPC_DECLSPEC int mpc_mul_naive (mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_mul_karatsuba (mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_fma_naive (mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t);
+#if defined (__cplusplus)
+}
+#endif
/* end pieces copied from mpc-impl.h */
#define MPC_OUT(x) \
diff --git a/tests/tfma.c b/tests/tfma.c
index 02eed66..bef457b 100644
--- a/tests/tfma.c
+++ b/tests/tfma.c
@@ -62,7 +62,7 @@ static void
check_random (void)
{
mpfr_prec_t prec;
- mpfr_rnd_t rnd_re, rnd_im;
+ int rnd_re, rnd_im;
mpc_t a, b, c;
mpc_init2 (a, 1000);
diff --git a/tests/tmul.c b/tests/tmul.c
index d83fca0..1c2cee7 100644
--- a/tests/tmul.c
+++ b/tests/tmul.c
@@ -1,6 +1,6 @@
/* tmul -- test file for mpc_mul.
-Copyright (C) 2002, 2005, 2008, 2009, 2010, 2011 INRIA
+Copyright (C) 2002, 2005, 2008, 2009, 2010, 2011, 2012 INRIA
This file is part of GNU MPC.
@@ -84,7 +84,7 @@ static void
check_regular (void)
{
mpc_t x, y;
- mpc_rnd_t rnd_re, rnd_im;
+ int rnd_re, rnd_im;
mpfr_prec_t prec;
testmul (247, -65, -223, 416, 8, 24);