]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Compat: Several compile issues in Profiler and LeakFinder
authorAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 24 Mar 2010 05:21:13 +0000 (23:21 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 24 Mar 2010 05:21:13 +0000 (23:21 -0600)
include/profiling.h
src/LeakFinder.cc
src/LeakFinder.h

index 5e617120de97554bb23b66089538b195f1f8b2c6..bd9d489c1396bf9d48f9a07e5f036bbf3e22654a 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef _PROFILING_H_
 #define _PROFILING_H_
 
@@ -10,9 +9,9 @@
 class CacheManager;
 #endif
 
-#ifdef USE_XPROF_STATS
+#if USE_XPROF_STATS
 
-#if !defined(_SQUID_SOLARIS_)
+#if !_SQUID_SOLARIS_
 typedef int64_t  hrtime_t;
 #else
 #include <sys/time.h>
index d13a02a1075f3b7cb4b81c7b797b037f665702b8..3f6e1ed95722feec051500a018c6cc33a324352f 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * $Id$
  *
@@ -69,9 +68,7 @@ LeakFinder::LeakFinder()
 }
 
 void *
-
-LeakFinder::add
-(void *p, const char *file, int line)
+LeakFinder::addSome(void *p, const char *file, int line)
 {
     assert(hash_lookup(table, p) == NULL);
     LeakFinderPtr *c = new LeakFinderPtr(p, file, line);
@@ -93,7 +90,7 @@ LeakFinder::touch(void *p, const char *file, int line)
 }
 
 void *
-LeakFinder::free(void *p, const char *file, int line)
+LeakFinder::freeSome(void *p, const char *file, int line)
 {
     assert(p);
     LeakFinderPtr *c = (LeakFinderPtr *) hash_lookup(table, p);
index dfb2ae8423b6a739a732d719c0cc38ad778203f8..7d0fc25d668acb348398a6402d137271f9f77afb 100644 (file)
@@ -1,13 +1,15 @@
-
-
-
 #ifndef SQUID_LEAKFINDER_H
 #define SQUID_LEAKFINDER_H
 
+#include "config.h"
+
 #if USE_LEAKFINDER
-#define leakAdd(p,l) if (l) l->add(p,__FILE__,__LINE__)
+
+#include "hash.h"
+
+#define leakAdd(p,l) if (l) l->addSome(p,__FILE__,__LINE__)
 #define leakTouch(p,l) if (l) l->touch(p,__FILE__,__LINE__)
-#define leakFree(p,l) if (l) l->free(p,__FILE__,__LINE__)
+#define leakFree(p,l) if (l) l->freeSome(p,__FILE__,__LINE__)
 
 class LeakFinderPtr : public hash_link
 {
@@ -26,12 +28,11 @@ public:
     LeakFinder();
     ~LeakFinder();
 
-    void *add
-    (void *, const char *, const int);
+    void *addSome(void *, const char *, const int);
 
     void *touch(void *, const char *, const int);
 
-    void *free(void *, const char *, const int);
+    void *freeSome(void *, const char *, const int);
 
     void dump();