summaryrefslogtreecommitdiff
path: root/src/mpfr-impl.h
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-09-06 11:48:21 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-09-06 11:48:21 +0000
commitf5d13e4e8cf01d28aaa0a9fddbd587714a97c0bd (patch)
tree7fa7853c0091bc59c4cbe5a55b1967d2b0be5ef4 /src/mpfr-impl.h
parentf1e67f66215f4a7b96bf494d4efaff0ee36285f7 (diff)
downloadmpfr-f5d13e4e8cf01d28aaa0a9fddbd587714a97c0bd.tar.gz
[src] Attempt to fix thread-safe DLL support with ICC and MSVC on
MS Windows without the GMP build directory. See: https://sympa.inria.fr/sympa/arc/mpfr/2017-09/msg00009.html https://sympa.inria.fr/sympa/arc/mpfr/2017-09/msg00014.html i.e. for the mpfr_allocate_func, mpfr_reallocate_func & mpfr_free_func external TLS variables, one does the same thing as what had been done for the other ones (__gmpfr_flags, __gmpfr_emin, __gmpfr_emax, etc.). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11712 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mpfr-impl.h')
-rw-r--r--src/mpfr-impl.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h
index a4e80363e..581271c85 100644
--- a/src/mpfr-impl.h
+++ b/src/mpfr-impl.h
@@ -228,6 +228,11 @@ extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emin;
extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emax;
extern MPFR_THREAD_ATTR mpfr_prec_t __gmpfr_default_fp_bit_precision;
extern MPFR_THREAD_ATTR mpfr_rnd_t __gmpfr_default_rounding_mode;
+# ifndef MPFR_HAVE_GMP_IMPL
+extern MPFR_THREAD_ATTR mpfr_allocate_func_t mpfr_allocate_func;
+extern MPFR_THREAD_ATTR mpfr_reallocate_func_t mpfr_reallocate_func;
+extern MPFR_THREAD_ATTR mpfr_free_func_t mpfr_free_func;
+# endif
extern MPFR_CACHE_ATTR mpfr_cache_t __gmpfr_cache_const_euler;
extern MPFR_CACHE_ATTR mpfr_cache_t __gmpfr_cache_const_catalan;
# ifndef MPFR_USE_LOGGING
@@ -254,6 +259,11 @@ __MPFR_DECLSPEC mpfr_exp_t * __gmpfr_emin_f (void);
__MPFR_DECLSPEC mpfr_exp_t * __gmpfr_emax_f (void);
__MPFR_DECLSPEC mpfr_prec_t * __gmpfr_default_fp_bit_precision_f (void);
__MPFR_DECLSPEC mpfr_rnd_t * __gmpfr_default_rounding_mode_f (void);
+# ifndef MPFR_HAVE_GMP_IMPL
+__MPFR_DECLSPEC mpfr_allocate_func_t * __gmpfr_allocate_func_f (void);
+__MPFR_DECLSPEC mpfr_reallocate_func_t * __gmpfr_reallocate_func_f (void);
+__MPFR_DECLSPEC mpfr_free_func_t * __gmpfr_free_func_f (void);
+# endif
__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_cache_const_euler_f (void);
__MPFR_DECLSPEC mpfr_cache_t * __gmpfr_cache_const_catalan_f (void);
# ifndef MPFR_USE_LOGGING
@@ -273,6 +283,11 @@ __MPFR_DECLSPEC mpfr_cache_ptr * __gmpfr_cache_const_log2_f (void);
# define __gmpfr_emax (*__gmpfr_emax_f())
# define __gmpfr_default_fp_bit_precision (*__gmpfr_default_fp_bit_precision_f())
# define __gmpfr_default_rounding_mode (*__gmpfr_default_rounding_mode_f())
+# ifndef MPFR_HAVE_GMP_IMPL
+# define mpfr_allocate_func (*__gmpfr_allocate_func_f())
+# define mpfr_reallocate_func (*__gmpfr_reallocate_func_f())
+# define mpfr_free_func (*__gmpfr_free_func_f())
+# endif
# define __gmpfr_cache_const_euler (*__gmpfr_cache_const_euler_f())
# define __gmpfr_cache_const_catalan (*__gmpfr_cache_const_catalan_f())
# ifndef MPFR_USE_LOGGING