summaryrefslogtreecommitdiffstats
path: root/contrib/groff
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1996-09-08 00:34:04 +0000
committerpst <pst@FreeBSD.org>1996-09-08 00:34:04 +0000
commit685be52a708d621af1940f62e0c9e7a4d593c8c9 (patch)
tree9898cbbb424bf7d6b38876edfa8530d73e1cda34 /contrib/groff
parent38b892a53a919f8297035fc88024f927d5089690 (diff)
downloadFreeBSD-src-685be52a708d621af1940f62e0c9e7a4d593c8c9.zip
FreeBSD-src-685be52a708d621af1940f62e0c9e7a4d593c8c9.tar.gz
Workarround for gcc 2.60 expression evaluation bug.
Diffstat (limited to 'contrib/groff')
-rw-r--r--contrib/groff/libgroff/font.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/groff/libgroff/font.cc b/contrib/groff/libgroff/font.cc
index 95da6b7..a90627e 100644
--- a/contrib/groff/libgroff/font.cc
+++ b/contrib/groff/libgroff/font.cc
@@ -194,7 +194,11 @@ static int scale_round(int n, int x, int y)
}
else {
if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x)
- return (n*x - y2)/y;
+ {
+ // XXX simplify expression to work around bug in gcc-2.6.0
+ int tmp = n*x - y2;
+ return tmp/y;
+ }
return int(n*double(x)/double(y) - .5);
}
}
OpenPOWER on IntegriCloud