From 1c400b4e5e8ec2e5f787c950e20209d0811b57e6 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 21 Aug 2011 13:15:34 +0200 Subject: zlib: ensure user provided memory functions are used by zlib, when given As a bonus, this lets our MemoryTracking subsystem track zlib operations. And also fixes a shortcut some zlib 1.2.x versions took using malloc() instead of calloc(), which would trigger memory debuggers warnings on memory being used without having been initialized. --- src/mkhelp.pl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mkhelp.pl b/src/mkhelp.pl index e9de8429d..d09d6c508 100644 --- a/src/mkhelp.pl +++ b/src/mkhelp.pl @@ -133,7 +133,6 @@ print < +#if defined(CURLDEBUG) && defined(CURLTOOLDEBUG) +#include "memdebug.h" +#endif static const unsigned char hugehelpgz[] = { /* This mumbo-jumbo is the huge help text compressed with gzip. Thanks to this operation, the size of this data shrunk from $gzip @@ -165,6 +167,17 @@ HEAD print <