summaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-30 22:15:07 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-30 22:15:07 +0000
commitb528101f5b38f4d65b21001fe75cf9f149fe1472 (patch)
tree0e98e3ca4131ab70355d335abec693371ee863af /numeric.c
parent25adb4198c1afa84f48688f1d6f3294b2d928141 (diff)
downloadruby-b528101f5b38f4d65b21001fe75cf9f149fe1472.tar.gz
ruby-b528101f5b38f4d65b21001fe75cf9f149fe1472.tar.xz
ruby-b528101f5b38f4d65b21001fe75cf9f149fe1472.zip
* numeric.c (SQRT_LONG_MAX): use SIZEOF_LONG instead of SIZEOF_VALUE
because SIZEOF_VALUE > SIZEOF_LONG on some platforms. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index f6782aebd..19e354709 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2046,7 +2046,7 @@ fix_minus(VALUE x, VALUE y)
* result.
*/
-#define SQRT_LONG_MAX ((SIGNED_VALUE)1<<((SIZEOF_VALUE*CHAR_BIT-1)/2))
+#define SQRT_LONG_MAX ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
/*tests if N*N would overflow*/
#define FIT_SQRT_LONG(n) (((n)<SQRT_LONG_MAX)&&((n)>=-SQRT_LONG_MAX))