libgfortran.h: When isfinite is not provided by the system...
* libgfortran.h: When isfinite is not provided by the system, define it as a macro, so that it can accept any floating point type. From-SVN: r102707
This commit is contained in:
parent
1d4def65c8
commit
06b23b9287
@ -1,3 +1,9 @@
|
|||||||
|
2005-08-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
|
* libgfortran.h: When isfinite is not provided by the system,
|
||||||
|
define it as a macro, so that it can accept any floating point
|
||||||
|
type.
|
||||||
|
|
||||||
2005-08-01 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
2005-08-01 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
PR libfortran/23178
|
PR libfortran/23178
|
||||||
|
@ -179,17 +179,11 @@ typedef off_t gfc_offset;
|
|||||||
alternatives, or bail out. */
|
alternatives, or bail out. */
|
||||||
#if (!defined(isfinite) || defined(__CYGWIN__))
|
#if (!defined(isfinite) || defined(__CYGWIN__))
|
||||||
#undef isfinite
|
#undef isfinite
|
||||||
static inline int
|
|
||||||
isfinite (double x)
|
|
||||||
{
|
|
||||||
#if defined(fpclassify)
|
#if defined(fpclassify)
|
||||||
return (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE);
|
#define isfinite(x) (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)
|
||||||
#elif defined(HAVE_FINITE)
|
|
||||||
return finite (x);
|
|
||||||
#else
|
#else
|
||||||
#error "libgfortran needs isfinite, fpclassify, or finite"
|
#define isfinite(x) ((x) - (x) == 0)
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
#endif /* !defined(isfinite) */
|
#endif /* !defined(isfinite) */
|
||||||
|
|
||||||
/* TODO: find the C99 version of these an move into above ifdef. */
|
/* TODO: find the C99 version of these an move into above ifdef. */
|
||||||
|
Loading…
Reference in New Issue
Block a user