From 3ca0948f68d1055cd980992dcb68deced0f4d704 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Fri, 19 Jan 2018 01:45:36 +0000 Subject: INFINITY is float. That of double is HUGE_VAL. It seems HUGE_VAL is already used. Why not eliminate INTINITY. NAN is also float. That of double is called nan(). This is also fixed. Signed-off-by: Urabe, Shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/missing.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/ruby/missing.h b/include/ruby/missing.h index a3d7a6b7b7..cda0aea164 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -155,6 +155,10 @@ RUBY_EXTERN const union bytesequence4_or_float rb_nan; # define NAN (rb_nan.float_value) #endif +#ifndef HUGE_VAL +# define HUGE_VAL ((double)INFINITY) +#endif + #ifndef isinf # ifndef HAVE_ISINF # if defined(HAVE_FINITE) && defined(HAVE_ISNAN) -- cgit v1.2.3