From 4cd86dbe9f7701134781562689d1a30d735eb9f2 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 7 Feb 2008 02:14:54 +0000 Subject: * missing/lgamma_r.c (lgamma_r): some compilers don't permit dividing by literal 0.0. use const variable instead. * {bcc32,win32,wince}/Makefile.sub (MISSING): add lgamma_r.obj and tgamma.obj. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/lgamma_r.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'missing/lgamma_r.c') diff --git a/missing/lgamma_r.c b/missing/lgamma_r.c index 70b6259c6b..856cc83288 100644 --- a/missing/lgamma_r.c +++ b/missing/lgamma_r.c @@ -51,8 +51,9 @@ lgamma_r(double x, int *signp) double i, f, s; f = modf(-x, &i); if (f == 0.0) { + static const double zero = 0.0; *signp = 1; - return 1.0/0.0; + return 1.0/zero; } *signp = (fmod(i, 2.0) != 0.0) ? 1 : -1; s = sin(PI * x); -- cgit v1.2.3