summaryrefslogtreecommitdiff
path: root/src/mpc.h
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-11-03 19:39:33 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-11-03 19:39:33 +0000
commit42c8f0135fab40c6f70d97f16f3e8fcd127dcec6 (patch)
tree30030d0a926714389751f127b0a085bc82fec82b /src/mpc.h
parentcd2581b4c05b828889d2011c89100d0934dc3875 (diff)
downloadmpc-42c8f0135fab40c6f70d97f16f3e8fcd127dcec6.tar.gz
mpc.h. mpc-tests.h, mpc-impl.h: handle __MPC_DECLSPEC as for mpfr;
define as __GMP_DECLSPEC_EXPORT if library is compiled and __GMP_LIBGMP_DLL, as in gmp otherwise git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1109 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src/mpc.h')
-rw-r--r--src/mpc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mpc.h b/src/mpc.h
index 65cce7a..8f38538 100644
--- a/src/mpc.h
+++ b/src/mpc.h
@@ -120,7 +120,15 @@ typedef __gmp_const __mpc_struct *mpc_srcptr;
# define __MPC_PROTO(x) ()
#endif
-/* Support for WINDOWS DLL, see the thread http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-April/000871.html */
+/* Support for WINDOWS DLL, see
+ http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-November/000990.html;
+ when building the DLL, export symbols, otherwise behave as GMP */
+#if defined (__MPC_WITHIN_MPC) && __GMP_LIBGMP_DLL
+#define __MPC_DECLSPEC __GMP_DECLSPEC_EXPORT
+#else
+#define __MPC_DECLSPEC __GMP_DECLSPEC
+#endif
+
#if __GMP_LIBGMP_DLL
# define __MPC_DECLSPEC __GMP_DECLSPEC_EXPORT
#else