From 665eddf5d795a64e2203256b9d76156d6e2a51c7 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sat, 3 Nov 2001 04:11:22 +0000 Subject: [PATCH] Conditional x* prototypes on !DMALLOC (as they're defined by dmalloc.h if DMALLOC is enabled). svn path=/trunk/yasm/; revision=311 --- libyasm/util.h | 8 +++++--- src/util.h | 8 +++++--- util.h | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/libyasm/util.h b/libyasm/util.h index 4fba8452..a56c3e9c 100644 --- a/libyasm/util.h +++ b/libyasm/util.h @@ -26,9 +26,6 @@ # include #endif -/* strdup() implementation with error checking (using xmalloc). */ -char *xstrdup(const char *str); - #if !defined(HAVE_MERGESORT) int mergesort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); @@ -67,11 +64,16 @@ int strncasecmp(const char *s1, const char *s2, size_t n); #include "ternary.h" +#ifndef DMALLOC +/* strdup() implementation with error checking (using xmalloc). */ +char *xstrdup(const char *str); + /* Error-checking memory allocation routines in xmalloc.c. */ void *xmalloc(size_t size); void *xcalloc(size_t nelem, size_t elsize); void *xrealloc(void *oldmem, size_t size); void xfree(void *p); +#endif #ifdef HAVE_SYS_CDEFS_H # include diff --git a/src/util.h b/src/util.h index 4fba8452..a56c3e9c 100644 --- a/src/util.h +++ b/src/util.h @@ -26,9 +26,6 @@ # include #endif -/* strdup() implementation with error checking (using xmalloc). */ -char *xstrdup(const char *str); - #if !defined(HAVE_MERGESORT) int mergesort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); @@ -67,11 +64,16 @@ int strncasecmp(const char *s1, const char *s2, size_t n); #include "ternary.h" +#ifndef DMALLOC +/* strdup() implementation with error checking (using xmalloc). */ +char *xstrdup(const char *str); + /* Error-checking memory allocation routines in xmalloc.c. */ void *xmalloc(size_t size); void *xcalloc(size_t nelem, size_t elsize); void *xrealloc(void *oldmem, size_t size); void xfree(void *p); +#endif #ifdef HAVE_SYS_CDEFS_H # include diff --git a/util.h b/util.h index 4fba8452..a56c3e9c 100644 --- a/util.h +++ b/util.h @@ -26,9 +26,6 @@ # include #endif -/* strdup() implementation with error checking (using xmalloc). */ -char *xstrdup(const char *str); - #if !defined(HAVE_MERGESORT) int mergesort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); @@ -67,11 +64,16 @@ int strncasecmp(const char *s1, const char *s2, size_t n); #include "ternary.h" +#ifndef DMALLOC +/* strdup() implementation with error checking (using xmalloc). */ +char *xstrdup(const char *str); + /* Error-checking memory allocation routines in xmalloc.c. */ void *xmalloc(size_t size); void *xcalloc(size_t nelem, size_t elsize); void *xrealloc(void *oldmem, size_t size); void xfree(void *p); +#endif #ifdef HAVE_SYS_CDEFS_H # include