From ba22e270f5ffebac8034ea916f9d4201b8ef1816 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Mon, 24 Oct 2016 12:53:55 +0000 Subject: [src] Support build as thread-safe DLL on Windows: clean-up. * Increased the use of macros to avoid some code duplication (with risks of typos) and to prevent the problems related to thread-safe DLL from appearing in the .c files. * The prototypes of the functions to access the address of a TLS variable are now defined. Otherwise one gets warnings: https://sympa.inria.fr/sympa/arc/mpfr/2016-10/msg00004.html git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10916 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/set_dfl_prec.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/set_dfl_prec.c') diff --git a/src/set_dfl_prec.c b/src/set_dfl_prec.c index 748bf7fa4..36dd8bf23 100644 --- a/src/set_dfl_prec.c +++ b/src/set_dfl_prec.c @@ -23,15 +23,8 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include "mpfr-impl.h" /* default is IEEE double precision, i.e. 53 bits */ -MPFR_THREAD_ATTR mpfr_prec_t __gmpfr_default_fp_bit_precision \ - = IEEE_DBL_MANT_DIG; - -#ifdef MPFR_WIN_THREAD_SAFE_DLL -mpfr_prec_t * __gmpfr_default_fp_bit_precision_f() -{ - return &__gmpfr_default_fp_bit_precision; -} -#endif +MPFR_THREAD_VAR (mpfr_prec_t, __gmpfr_default_fp_bit_precision, + IEEE_DBL_MANT_DIG) void mpfr_set_default_prec (mpfr_prec_t prec) -- cgit v1.2.1