From 4915be3b49e6376b0aeb28cddf6f6b8bc3ad38b7 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Fri, 17 Jul 1998 04:55:42 +0000 Subject: [PATCH] SCO 3.2v4.2 doesn't have rint() -- mauri@mbp.ee --- configure.in | 5 +++-- lib/util.c | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 2b019e2fd9..3b1f4c5b8e 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.132 1998/06/08 17:02:39 wessels Exp $ +dnl $Id: configure.in,v 1.133 1998/07/16 22:55:43 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.132 $)dnl +AC_REVISION($Revision: 1.133 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -667,6 +667,7 @@ AC_CHECK_FUNCS(\ regexec \ regfree \ res_init \ + rint \ seteuid \ setpgrp \ setrlimit \ diff --git a/lib/util.c b/lib/util.c index 93de3e7587..47ef1eea01 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1,6 +1,6 @@ /* - * $Id: util.c,v 1.59 1998/05/15 20:50:25 wessels Exp $ + * $Id: util.c,v 1.60 1998/07/16 22:55:42 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -750,7 +750,12 @@ xpercent(double part, double whole) int xpercentInt(double part, double whole) { +#if HAVE_RINT return (int) rint(xpercent(part, whole)); +#else + /* SCO 3.2v4.2 doesn't have rint() -- mauri@mbp.ee */ + return (int) floor(xpercent(part, whole)+0.5); +#endif } /* somewhat safer division */ -- 2.47.3