2004-06-14 Bud Davis <bdavis9659@comcast.net>
PR gfortran/15292
* intrinsics/c99_functions.c: Use fpclassify if it exists.
From-SVN: r83116
+2004-06-14 Bud Davis <bdavis9659@comcast.net>
+
+ PR gfortran/15292
+ * intrinsics/c99_functions.c: Use fpclassify if it exists.
+
2004-06-13 Paul Brook <paul@codesourcery.com>
* Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
#include "libgfortran.h"
+/* Note that if HAVE_FPCLASSIFY is not defined, then NaN is not handled */
+
/* Algorithm by Steven G. Kargl. */
#ifndef HAVE_ROUND
round(double x)
{
double t;
+#ifdef HAVE_FPCLASSIFY
int i;
-
i = fpclassify(x);
if (i == FP_INFINITE || i == FP_NAN)
return (x);
+#endif
if (x >= 0.0)
{
roundf(float x)
{
float t;
+#ifdef HAVE_FPCLASSIFY
int i;
i = fpclassify(x);
if (i == FP_INFINITE || i == FP_NAN)
return (x);
+#endif
if (x >= 0.0)
{