summaryrefslogtreecommitdiff
path: root/rnd_mode.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-06-06 11:08:47 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-06-06 11:08:47 +0000
commite202b160fad66985f192ce9c26df1afa1c79bc4d (patch)
tree00d337dcb8628ab5027a4edecec817644894a2ab /rnd_mode.c
parent085278c8c50990e20a503fba23e7e8705652d166 (diff)
downloadmpfr-e202b160fad66985f192ce9c26df1afa1c79bc4d.tar.gz
Use gmp-impl.h to get MPFR_HAVE_FESETROUND (reported by Kevin Ryde).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1943 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'rnd_mode.c')
-rw-r--r--rnd_mode.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/rnd_mode.c b/rnd_mode.c
index b279c5ed3..e3faa1c5d 100644
--- a/rnd_mode.c
+++ b/rnd_mode.c
@@ -19,13 +19,19 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-#ifdef MPFR_HAVE_FESETROUND
#include <stdio.h>
#include <stdlib.h>
-#include <fenv.h>
#include "gmp.h"
+#include "gmp-impl.h"
#include "mpfr.h"
+/* Note: "gmp-impl.h" must be included because MPFR_HAVE_FESETROUND
+ may be defined from it (if MPFR is built with GMP). */
+
+#ifdef MPFR_HAVE_FESETROUND
+
+#include <fenv.h>
+
/* sets the machine rounding mode to the value rnd_mode */
void
mpfr_set_machine_rnd_mode (mp_rnd_t rnd_mode)
@@ -38,4 +44,5 @@ mpfr_set_machine_rnd_mode (mp_rnd_t rnd_mode)
default: fprintf(stderr, "invalid rounding mode\n"); exit(1);
}
}
+
#endif