diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2005-08-03 22:00:00 +0200 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2005-08-03 20:00:00 +0000 |
commit | 06b23b9287b1238d77cc82179014f2c652c4d653 (patch) | |
tree | e86054ac99a2ed7631ec270a52b16f1f7ccc07d2 | |
parent | 1d4def65c83117412beb8093851e349070cc7c1d (diff) | |
download | gcc-06b23b9287b1238d77cc82179014f2c652c4d653.zip gcc-06b23b9287b1238d77cc82179014f2c652c4d653.tar.gz gcc-06b23b9287b1238d77cc82179014f2c652c4d653.tar.bz2 |
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
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/libgfortran.h | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index cdd3f11..e725012 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -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> PR libfortran/23178 diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index ccba2a7..6db6ef9 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -179,17 +179,11 @@ typedef off_t gfc_offset; alternatives, or bail out. */ #if (!defined(isfinite) || defined(__CYGWIN__)) #undef isfinite -static inline int -isfinite (double x) -{ #if defined(fpclassify) - return (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE); -#elif defined(HAVE_FINITE) - return finite (x); +#define isfinite(x) (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE) #else -#error "libgfortran needs isfinite, fpclassify, or finite" +#define isfinite(x) ((x) - (x) == 0) #endif -} #endif /* !defined(isfinite) */ /* TODO: find the C99 version of these an move into above ifdef. */ |