diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-20 15:45:15 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-20 15:45:15 +0000 |
| commit | 57a47fb3881b56058743fe117a4a4c198793a9e6 (patch) | |
| tree | db5ce495631901ac5458a7373cfcb0bae9e2fc56 /missing/isinf.c | |
| parent | fcb51989a44e19935ce7dd214464a7dffc0632c2 (diff) | |
| download | ruby-57a47fb3881b56058743fe117a4a4c198793a9e6.tar.gz ruby-57a47fb3881b56058743fe117a4a4c198793a9e6.tar.xz ruby-57a47fb3881b56058743fe117a4a4c198793a9e6.zip | |
* eval.c (rb_with_disable_interrupt): prohibit thread context
switch during proc execution. [ruby-dev:21899]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing/isinf.c')
| -rw-r--r-- | missing/isinf.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/missing/isinf.c b/missing/isinf.c index 38772ba4f..1b09f11f1 100644 --- a/missing/isinf.c +++ b/missing/isinf.c @@ -9,16 +9,33 @@ int isinf(n) double n; { - if (IsNANorINF(n) && IsINF(n)) { - return 1; - } else { - return 0; - } + if (IsNANorINF(n) && IsINF(n)) { + return 1; + } + else { + return 0; + } } #else #include "config.h" + +#if defined(HAVE_FINITE) && defined(HAVE_ISNAN) + +#ifdef HAVE_IEEEFP_H +#include <ieeefp.h> +#endif + +int +isinf(n) + double n; +{ + return (!finite(x) && !isnan(x)) +} + +#else + #ifdef HAVE_STRING_H # include <string.h> #else @@ -44,3 +61,4 @@ isinf(n) || memcmp(&n, &ninf, sizeof n) == 0; } #endif +#endif |
