]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
put rusage typedef hack here
authorwessels <>
Sat, 6 Dec 1997 08:26:28 +0000 (08:26 +0000)
committerwessels <>
Sat, 6 Dec 1997 08:26:28 +0000 (08:26 +0000)
src/squid.h

index 292d97f58158494a6a41af8d64895eb270280a63..6c064ba96d287d8c4cd1e0aefff91fc6f19fb05f 100644 (file)
@@ -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
  *
 #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_)