summaryrefslogtreecommitdiff
path: root/src/set_dfl_prec.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-10-24 12:53:55 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-10-24 12:53:55 +0000
commitba22e270f5ffebac8034ea916f9d4201b8ef1816 (patch)
treed11d92957b2be704231f6a40368a9e8f04fd12cd /src/set_dfl_prec.c
parentadf2759eaaeddbe89a305dafb2185f4a998aa1e2 (diff)
downloadmpfr-ba22e270f5ffebac8034ea916f9d4201b8ef1816.tar.gz
[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
Diffstat (limited to 'src/set_dfl_prec.c')
-rw-r--r--src/set_dfl_prec.c11
1 files changed, 2 insertions, 9 deletions
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)