diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2012-07-05 08:20:05 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2012-07-05 08:20:05 +0000 |
commit | 0a5f9840d4778b15543716787ef81be1cf627bca (patch) | |
tree | f2f7d1afc36ceed2c3b71ac89d06c2dd8c3ebaaf /tests | |
parent | e519e2b49bfeac77d395ce65af4cbedae2e47485 (diff) | |
download | mpc-0a5f9840d4778b15543716787ef81be1cf627bca.tar.gz |
mpc-tests.h, tfma.c, tmul.c: small changes to allow compilation with c++
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1222 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mpc-tests.h | 6 | ||||
-rw-r--r-- | tests/tfma.c | 2 | ||||
-rw-r--r-- | tests/tmul.c | 4 |
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); |