summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-09-10 14:18:22 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-09-10 14:18:22 +0000
commit7f36b4eaae5151d671715c726bce36a5a0929204 (patch)
tree37e8a112736ca1ceb65a5a6b466ad841617ad8b0
parenta39d8ebee7b46c10c2acfdb12392baf3680debb2 (diff)
downloadmpfr-7f36b4eaae5151d671715c726bce36a5a0929204.tar.gz
[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
-rw-r--r--src/mpfr-impl.h13
1 files changed, 13 insertions, 0 deletions
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;