]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix malloc_statistics C++ linkages
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 3 Dec 2010 04:57:33 +0000 (17:57 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 3 Dec 2010 04:57:33 +0000 (17:57 +1300)
compat/xalloc.h
include/util.h

index fd9260145924436651b69f5a97fae33464d35a0a..1d86f404e240873374684da1845fcbc31e512296 100644 (file)
@@ -62,13 +62,12 @@ extern "C" {
      */
 #define safe_free(x)    while (x) { xxfree(x); (x) = NULL; }
 
-
-#if XMALLOC_STATISTICS
-    void malloc_statistics(void (*func) (int, int, int, void *), void *data);
-#endif
-
 #ifdef __cplusplus
 }
 #endif
 
+#if XMALLOC_STATISTICS
+extern void malloc_statistics(void (*func) (int, int, int, void *), void *data);
+#endif
+
 #endif /* _SQUID_COMPAT_XALLOC_H */
index f3d1c40c5c887818a9b534dca91fbd40db3d2835..4f4e426a75ea4693bc5bed1a4dcfd6b6853c6d69 100644 (file)
@@ -66,10 +66,6 @@ SQUIDCEXTERN void Tolower(char *);
 #include "SquidNew.h"
 #endif
 
-#if 0 && XMALLOC_STATISTICS
-SQUIDCEXTERN void malloc_statistics(void (*)(int, int, int, void *), void *);
-#endif
-
 #if XMALLOC_TRACE
 #define xmalloc(size) (xmalloc_func="xmalloc",xmalloc_line=__LINE__,xmalloc_file=__FILE__,xmalloc(size))
 #define xfree(ptr) (xmalloc_func="xfree",xmalloc_line=__LINE__,xmalloc_file=__FILE__,xfree(ptr))