From: wessels <> Date: Sat, 6 Dec 1997 08:26:28 +0000 (+0000) Subject: put rusage typedef hack here X-Git-Tag: SQUID_3_0_PRE1~4381 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd8f46824e01655843b3dbd23ffc2cc3f7bf3543;p=thirdparty%2Fsquid.git put rusage typedef hack here --- diff --git a/src/squid.h b/src/squid.h index 292d97f581..6c064ba96d 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.143 1997/12/05 22:01:15 wessels Exp $ + * $Id: squid.h,v 1.144 1997/12/06 01:26:28 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -206,9 +206,23 @@ #define MAXPATHLEN SQUID_MAXPATHLEN #endif -#if !defined(HAVE_GETRUSAGE) && defined(_SQUID_HPUX_) +#if !HAVE_GETRUSAGE +#if defined(_SQUID_HPUX_) #define HAVE_GETRUSAGE 1 #define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b) +#else +/* + * If we don't have getrusage() then we create a fake structure + * with only the fields Squid cares about. This just makes the + * source code cleaner, so we don't need lots of #ifdefs in other + * places + */ +typedef void struct { + struct timeval ru_stime; + int ru_maxrss; + int ru_majflt; +} rusage; +#endif #endif #if !defined(HAVE_GETPAGESIZE) && defined(_SQUID_HPUX_)