Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Core
Tor
Commits
fa2c3a73
Commit
fa2c3a73
authored
Nov 30, 2007
by
Roger Dingledine
Browse files
make dmalloc 5.4.2 work again too
svn:r12615
parent
ad0fcef5
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.in
View file @
fa2c3a73
...
...
@@ -500,6 +500,7 @@ if [[ $dmalloc -eq 1 ]]; then
AC_SEARCH_LIBS(dmalloc_malloc, [dmallocth dmalloc], , AC_MSG_ERROR(Libdmalloc library not found. If you enable it you better have it installed.))
AC_DEFINE(USE_DMALLOC, 1, [Debug memory allocation library])
AC_DEFINE(DMALLOC_FUNC_CHECK, 1, [Enable dmalloc's malloc function check])
AC_CHECK_FUNCS(dmalloc_strdup dmalloc_strndup)
fi
# Allow user to specify an alternate syslog facility
...
...
src/common/util.c
View file @
fa2c3a73
...
...
@@ -79,8 +79,17 @@ const char util_c_id[] = "$Id$";
#undef strndup
#include
<dmalloc.h>
#define DMALLOC_FN_ARGS , file, line
#define dmalloc_strdup(file, line, string, xalloc_b) dmalloc_strndup(file, line, (string), -1, xalloc_b)
#else
#if defined(HAVE_DMALLOC_STRDUP)
/* the dmalloc_strdup should be fine as defined */
#elif defined(HAVE_DMALLOC_STRNDUP)
#define dmalloc_strdup(file, line, string, xalloc_b) \
dmalloc_strndup(file, line, (string), -1, xalloc_b)
#else
#error "No dmalloc_strdup or equivalent"
#endif
#else
/* not using dmalloc */
#define dmalloc_strdup(file, line, string, xalloc_b) strdup(string)
#define dmalloc_malloc(file, line, size, func_id, alignment, xalloc_b) \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment