]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SCO 3.2v4.2 doesn't have rint() -- mauri@mbp.ee
authorwessels <>
Fri, 17 Jul 1998 04:55:42 +0000 (04:55 +0000)
committerwessels <>
Fri, 17 Jul 1998 04:55:42 +0000 (04:55 +0000)
configure.in
lib/util.c

index 2b019e2fd9a35a876f937f69cf7502c6cb252029..3b1f4c5b8e97bc757340e65d064251bf38ce2b89 100644 (file)
@@ -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 \
index 93de3e75877ee817c21d7c937ac79fa40f3650e6..47ef1eea010fded6f94a56626017b4babe67fdde 100644 (file)
@@ -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 */