From 64d486ad2684c632c5e62af973d3b783563d88ee Mon Sep 17 00:00:00 2001 From: enge Date: Tue, 20 Dec 2011 12:11:15 +0000 Subject: mpc.h, mpc-impl.h, logging.c: correctly determine that logging.c belongs to the library although it does not include mpc-impl.h see http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-December/001027.html git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1117 211d60ee-9f03-0410-a15a-8952a2c7a4e4 --- src/logging.c | 3 +++ src/mpc-impl.h | 2 ++ src/mpc.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/logging.c b/src/logging.c index 66ee2b8..79ed033 100644 --- a/src/logging.c +++ b/src/logging.c @@ -28,6 +28,9 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #include #endif +#define __MPC_LIBRARY_BUILD + /* to indicate we are inside the library build; needed here since mpc-log.h + includes mpc.h and not mpc-impl.h */ #include "mpc-log.h" #ifdef HAVE_DLFCN_H diff --git a/src/mpc-impl.h b/src/mpc-impl.h index 13582d1..8080479 100644 --- a/src/mpc-impl.h +++ b/src/mpc-impl.h @@ -20,6 +20,8 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #ifndef __MPC_IMPL_H #define __MPC_IMPL_H +#define __MPC_LIBRARY_BUILD + /* to indicate we are inside the library build */ #include "config.h" #ifdef HAVE_STDLIB_H diff --git a/src/mpc.h b/src/mpc.h index 5b6ec46..3184a5a 100644 --- a/src/mpc.h +++ b/src/mpc.h @@ -123,7 +123,7 @@ typedef __gmp_const __mpc_struct *mpc_srcptr; /* 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_IMPL_H) && __GMP_LIBGMP_DLL +#if defined (__MPC_LIBRARY_BUILD) && __GMP_LIBGMP_DLL #define __MPC_DECLSPEC __GMP_DECLSPEC_EXPORT #else #define __MPC_DECLSPEC __GMP_DECLSPEC -- cgit v1.2.1