From: Chris Hanson Date: Mon, 14 Dec 2009 09:58:56 +0000 (-0800) Subject: Eliminate use of C99 function copysign; should not be used without X-Git-Tag: 20100708-Gtk~200 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9859e04cedf4266362a52230a801650cb364f442;p=mit-scheme.git Eliminate use of C99 function copysign; should not be used without testing in configure.ac. --- diff --git a/src/microcode/artutl.c b/src/microcode/artutl.c index 1bf7ea7f2..0ecf0df4a 100644 --- a/src/microcode/artutl.c +++ b/src/microcode/artutl.c @@ -133,8 +133,10 @@ double_round (double x) ? ((fmod (integral, 2.0)) == 0.0) : (! (0.5 < fractional))) return (integral); + else if (x < 0.0) + return (integral - 1.0); else - return (integral + (copysign (1.0, x))); + return (integral + 1.0); } /* Conversions between Scheme types and Scheme types. */