From c820c969c42683197039bab5cf03b5c3419d33f7 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: http://svn.ruby-lang.org/repos/ruby/trunk@15390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/lgamma_r.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'missing') diff --git a/missing/lgamma_r.c b/missing/lgamma_r.c index 70b6259c6..856cc8328 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