From 7f36b4eaae5151d671715c726bce36a5a0929204 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Thu, 10 Sep 2015 14:18:22 +0000 Subject: [src/mpfr-impl.h] Detect some possible inconsistencies under Unix, when some macro should imply a MS-Windows platform. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/win-thread-safe-dll@9682 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/mpfr-impl.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h index 628adc193..8f443fd56 100644 --- a/src/mpfr-impl.h +++ b/src/mpfr-impl.h @@ -208,6 +208,19 @@ typedef struct __gmpfr_cache_s *mpfr_cache_ptr; # define MPFR_WIN_THREAD_SAFE_DLL 1 #endif +/* Detect some possible inconsistencies under Unix. */ +#if defined(__unix__) +# if defined(_WIN32) +# error "Both __unix__ and _WIN32 are defined" +# endif +# if __GMP_LIBGMP_DLL +# error "__unix__ is defined and __GMP_LIBGMP_DLL is true" +# endif +# if defined(MPFR_WIN_THREAD_SAFE_DLL) +# error "Both __unix__ and MPFR_WIN_THREAD_SAFE_DLL are defined" +# endif +#endif + #if defined(__MPFR_WITHIN_MPFR) || !defined(MPFR_WIN_THREAD_SAFE_DLL) extern MPFR_THREAD_ATTR mpfr_flags_t __gmpfr_flags; extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emin; -- cgit v1.2.1