summaryrefslogtreecommitdiff
path: root/set_d.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-06-25 17:36:57 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-06-25 17:36:57 +0000
commit28500f18c3c16fe509a2dd55dc1b2acf6555cb19 (patch)
treeda68fbafce63f6e18bb7c1407363678ead5e41ae /set_d.c
parentc52e3b07b1fa741f5d18ffaf89b6776c6090edfd (diff)
downloadmpfr-28500f18c3c16fe509a2dd55dc1b2acf6555cb19.tar.gz
Prototypes et quelques causes de warnings corriges.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@205 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_d.c')
-rw-r--r--set_d.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/set_d.c b/set_d.c
index e12c1a4f3..47a659670 100644
--- a/set_d.c
+++ b/set_d.c
@@ -1,4 +1,8 @@
-#include <math.h> /* for isnan */
+#if __GNUC__ /* gcc "patched" headers seem to omit isnan... */
+extern int isnan(double);
+#endif
+#include <math.h> /* for isnan and NaN */
+
#include "gmp.h"
#include "gmp-impl.h"
#include "longlong.h"
@@ -206,7 +210,14 @@ __mpfr_scale2 (d, exp)
/* End of part included from gmp */
void
+#if __STDC__
mpfr_set_d(mpfr_t r, double d, unsigned char rnd_mode)
+#else
+mpfr_set_d(r, d, rnd_mode)
+ mpfr_t r;
+ double d;
+ unsigned char rnd_mode;
+#endif
{
int signd, sizer; unsigned int cnt;
@@ -237,7 +248,13 @@ mpfr_set_d(mpfr_t r, double d, unsigned char rnd_mode)
}
double
+#if __STDC__
mpfr_get_d2(mpfr_srcptr src, long e)
+#else
+mpfr_get_d2(src, e)
+ mpfr_srcptr(src);
+ long e;
+#endif
{
double res;
mp_size_t size, i, n_limbs_to_use;
@@ -276,8 +293,13 @@ mpfr_get_d2(mpfr_srcptr src, long e)
}
double
+#if __STDC__
mpfr_get_d(mpfr_srcptr src)
+#else
+mpfr_get_d(src)
+ mpfr_srcptr src;
+#endif
{
- mpfr_get_d2(src, EXP(src));
+ return mpfr_get_d2(src, EXP(src));
}