summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-09-23 13:54:41 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-09-23 13:54:41 +0000
commit45d2d17fd58a62724d641191afe7c09a4c424103 (patch)
treefa3935c4d1f677dc8379d4d814780955c5866574
parent85f2bfe1270adf7c07f231cfca38f2b5af21322d (diff)
downloadmpfr-45d2d17fd58a62724d641191afe7c09a4c424103.tar.gz
Fix some tiny problems.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2984 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--mpfr.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/mpfr.h b/mpfr.h
index 151d46d92..3154ac3d0 100644
--- a/mpfr.h
+++ b/mpfr.h
@@ -99,8 +99,12 @@ typedef struct {
} __mpfr_struct;
/* Compatibility with previous types of MPFR */
-#define mp_rnd_t mpfr_rnd_t
-#define mp_prec_t mpfr_prec_t
+#ifndef mp_rnd_t
+# define mp_rnd_t mpfr_rnd_t
+#endif
+#ifndef mp_prec_t
+# define mp_prec_t mpfr_prec_t
+#endif
/*
The represented number is
@@ -515,6 +519,7 @@ int mpfr_strtofr _MPFR_PROTO ((mpfr_ptr, __gmp_const char *, char **,
Remove ICC since it defines __GNUC__, but produces a
huge number of warnings if you use this code */
#if defined (__GNUC__) && !defined(__ICC)
+#if (__GNUC__ >= 2)
#undef mpfr_cmp_ui
#define mpfr_cmp_ui(_f,_u) \
(__builtin_constant_p (_u) && (_u) == 0 ? \
@@ -531,6 +536,7 @@ int mpfr_strtofr _MPFR_PROTO ((mpfr_ptr, __gmp_const char *, char **,
mpfr_set_ui ((_f), (_s), (_r)) : \
mpfr_set_si ((_f), (_s), (_r)))
#endif
+#endif
/* Compatibility layer -- obsolete functions and macros */
#define mpfr_cmp_abs mpfr_cmpabs