summaryrefslogtreecommitdiff
path: root/src/const_log2.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-09-10 13:51:48 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-09-10 13:51:48 +0000
commit5075de70a69719bcf26668bb7a5979b9b261272a (patch)
tree98c530abbb0a7b16ed7b266e15fdafc63acddc3d /src/const_log2.c
parent1ab275e616dfb3d5d565c98db2e8f5ec1ce4e217 (diff)
downloadmpfr-5075de70a69719bcf26668bb7a5979b9b261272a.tar.gz
Applied changes from Stephan Tolksdorf:
https://gforge.inria.fr/tracker/download.php/136/619/19537/4980/changes.zip The MPFR build fails on my Linux machine with CFLAGS=-Werror=missing-prototypes because MPFR_WIN_THREAD_SAFE_DLL gets defined (this CFLAGS just allowed me to detect the problem with MPFR_WIN_THREAD_SAFE_DLL, which could have otherwise remained unnoticed). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/win-thread-safe-dll@9680 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/const_log2.c')
-rw-r--r--src/const_log2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/const_log2.c b/src/const_log2.c
index 2d94bdb02..6255396b3 100644
--- a/src/const_log2.c
+++ b/src/const_log2.c
@@ -32,6 +32,16 @@ MPFR_DECL_INIT_CACHE(__gmpfr_logging_log2, mpfr_const_log2_internal);
MPFR_THREAD_ATTR mpfr_cache_ptr __gmpfr_cache_const_log2 = __gmpfr_normal_log2;
#endif
+#ifdef MPFR_WIN_THREAD_SAFE_DLL
+# ifndef MPFR_USE_LOGGING
+mpfr_cache_t * __gmpfr_cache_const_log2_f() { return &__gmpfr_cache_const_log2; }
+# else
+mpfr_cache_t * __gmpfr_normal_log2_f() { return &__gmpfr_normal_log2; }
+mpfr_cache_t * __gmpfr_logging_log2_f() { return &__gmpfr_logging_log2; }
+mpfr_cache_ptr * __gmpfr_cache_const_log2_f() { return &__gmpfr_cache_const_log2; }
+# endif
+#endif
+
/* Set User interface */
#undef mpfr_const_log2
int