use CURLDEBUG instead of MALLOCDEBUG for preprocessor conditions
This commit is contained in:
@@ -124,7 +124,7 @@ Content-Disposition: form-data; name="FILECONTENT"
|
|||||||
#include "strequal.h"
|
#include "strequal.h"
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <unixlib.h>
|
#include <unixlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Make this the last #include */
|
/* Make this the last #include */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#else
|
#else
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "llist.h"
|
#include "llist.h"
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
/* this must be the last include file */
|
/* this must be the last include file */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
12
lib/hostip.c
12
lib/hostip.c
@@ -74,7 +74,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ hostcache_prune(curl_hash *hostcache, int cache_timeout, int now)
|
|||||||
hostcache_timestamp_remove);
|
hostcache_timestamp_remove);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MALLOCDEBUG) && defined(AGGRESIVE_TEST)
|
#if defined(CURLDEBUG) && defined(AGGRESIVE_TEST)
|
||||||
/* Called from Curl_done() to check that there's no DNS cache entry with
|
/* Called from Curl_done() to check that there's no DNS cache entry with
|
||||||
a non-zero counter left. */
|
a non-zero counter left. */
|
||||||
void Curl_scan_cache_used(void *user, void *ptr)
|
void Curl_scan_cache_used(void *user, void *ptr)
|
||||||
@@ -282,7 +282,7 @@ struct Curl_dns_entry *Curl_resolv(struct SessionHandle *data,
|
|||||||
|
|
||||||
dns->timestamp = now;
|
dns->timestamp = now;
|
||||||
dns->inuse++; /* mark entry as in-use */
|
dns->inuse++; /* mark entry as in-use */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
dns->entry_id = entry_id;
|
dns->entry_id = entry_id;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ void Curl_freednsinfo(void *freethis)
|
|||||||
|
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
/* These two are strictly for memory tracing and are using the same
|
/* These two are strictly for memory tracing and are using the same
|
||||||
* style as the family otherwise present in memdebug.c. I put these ones
|
* style as the family otherwise present in memdebug.c. I put these ones
|
||||||
* here since they require a bunch of struct types I didn't wanna include
|
* here since they require a bunch of struct types I didn't wanna include
|
||||||
@@ -631,7 +631,7 @@ static Curl_addrinfo *my_getaddrinfo(struct SessionHandle *data,
|
|||||||
step_size+=200;
|
step_size+=200;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
infof(data, "gethostbyname_r() uses %d bytes\n", step_size);
|
infof(data, "gethostbyname_r() uses %d bytes\n", step_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -681,7 +681,7 @@ static Curl_addrinfo *my_getaddrinfo(struct SessionHandle *data,
|
|||||||
if(!h) /* failure */
|
if(!h) /* failure */
|
||||||
res=1;
|
res=1;
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
infof(data, "gethostbyname_r() uses %d bytes\n", step_size);
|
infof(data, "gethostbyname_r() uses %d bytes\n", step_size);
|
||||||
#endif
|
#endif
|
||||||
if(!res) {
|
if(!res) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ struct Curl_dns_entry {
|
|||||||
time_t timestamp;
|
time_t timestamp;
|
||||||
long inuse; /* use-counter, make very sure you decrease this
|
long inuse; /* use-counter, make very sure you decrease this
|
||||||
when you're done using the address you received */
|
when you're done using the address you received */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
char *entry_id;
|
char *entry_id;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@@ -70,7 +70,7 @@ void Curl_freeaddrinfo(Curl_addrinfo *freeaddr);
|
|||||||
/* free cached name info */
|
/* free cached name info */
|
||||||
void Curl_freednsinfo(void *freethis);
|
void Curl_freednsinfo(void *freethis);
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
void curl_freeaddrinfo(struct addrinfo *freethis,
|
void curl_freeaddrinfo(struct addrinfo *freethis,
|
||||||
int line, const char *source);
|
int line, const char *source);
|
||||||
int curl_getaddrinfo(char *hostname, char *service,
|
int curl_getaddrinfo(char *hostname, char *service,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#include <curl/mprintf.h>
|
#include <curl/mprintf.h>
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#include <curl/mprintf.h>
|
#include <curl/mprintf.h>
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -106,6 +106,9 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
|
|||||||
/* allow the list to be comma-separated */
|
/* allow the list to be comma-separated */
|
||||||
header++;
|
header++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!data->state.digest.nonce)
|
||||||
|
return CURLDIGEST_BAD;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* else not a digest, get out */
|
/* else not a digest, get out */
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "llist.h"
|
#include "llist.h"
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
/* this must be the last include file */
|
/* this must be the last include file */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
@@ -220,4 +220,4 @@ int curl_fclose(FILE *file, int line, const char *source)
|
|||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
int VOID_VAR_MEMDEBUG;
|
int VOID_VAR_MEMDEBUG;
|
||||||
#endif
|
#endif
|
||||||
#endif /* MALLOCDEBUG */
|
#endif /* CURLDEBUG */
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include "progress.h"
|
#include "progress.h"
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
|
|||||||
easy=multi->easy.next;
|
easy=multi->easy.next;
|
||||||
while(easy) {
|
while(easy) {
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
fprintf(stderr, "HANDLE %p: State: %x\n",
|
fprintf(stderr, "HANDLE %p: State: %x\n",
|
||||||
(char *)easy, easy->state);
|
(char *)easy, easy->state);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include "strtok.h"
|
#include "strtok.h"
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ int Curl_parsenetrc(char *host,
|
|||||||
|
|
||||||
sprintf(netrcbuffer, "%s%s%s", home, DIR_CHAR, NETRC);
|
sprintf(netrcbuffer, "%s%s%s", home, DIR_CHAR, NETRC);
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
{
|
{
|
||||||
/* This is a hack to allow testing.
|
/* This is a hack to allow testing.
|
||||||
* If compiled with --enable-debug and CURL_DEBUG_NETRC is defined,
|
* If compiled with --enable-debug and CURL_DEBUG_NETRC is defined,
|
||||||
@@ -141,7 +141,7 @@ int Curl_parsenetrc(char *host,
|
|||||||
free(override);
|
free(override);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* MALLOCDEBUG */
|
#endif /* CURLDEBUG */
|
||||||
|
|
||||||
file = fopen(netrcbuffer, "r");
|
file = fopen(netrcbuffer, "r");
|
||||||
if(file) {
|
if(file) {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
#include "ftp.h"
|
#include "ftp.h"
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
#include "arpa_telnet.h"
|
#include "arpa_telnet.h"
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef CURLDEBUG
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user