summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/compat.c9
-rw-r--r--common/compat.h4
-rw-r--r--common/usuals.h1
3 files changed, 9 insertions, 5 deletions
diff --git a/common/compat.c b/common/compat.c
index ff8d527..e1bddef 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -443,13 +443,14 @@ char* strlwr(char *string)
#ifndef HAVE_REALLOCF
+#undef reallocf
-void* reallocf(void* ptr, size_t size)
+void* reallocf(void* pt, size_t sz)
{
- void* ret = realloc(ptr, size);
+ void* ret = realloc(pt, sz);
- if(!ret && size)
- free(ptr);
+ if(!ret && sz)
+ free(pt);
return ret;
}
diff --git a/common/compat.h b/common/compat.h
index 2d16cc4..86a9e04 100644
--- a/common/compat.h
+++ b/common/compat.h
@@ -29,6 +29,10 @@
#endif
#endif
+#ifdef WITH_DMALLOC
+#include "dmalloc.h"
+#endif
+
#ifndef HAVE_STDARG_H
#error ERROR: Must have a working <stdarg.h> header
#else
diff --git a/common/usuals.h b/common/usuals.h
index e263e74..d09fd72 100644
--- a/common/usuals.h
+++ b/common/usuals.h
@@ -57,5 +57,4 @@
#endif
-
#endif //__USUALS_H__20000613