]> granicus.if.org Git - yasm/commitdiff
Conditional x* prototypes on !DMALLOC (as they're defined by dmalloc.h if
authorPeter Johnson <peter@tortall.net>
Sat, 3 Nov 2001 04:11:22 +0000 (04:11 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 3 Nov 2001 04:11:22 +0000 (04:11 -0000)
DMALLOC is enabled).

svn path=/trunk/yasm/; revision=311

libyasm/util.h
src/util.h
util.h

index 4fba8452bf64da292300d1b9ff85b67bd26819d9..a56c3e9cd0bd40160468827477f03ce9107f208d 100644 (file)
@@ -26,9 +26,6 @@
 # include <stddef.h>
 #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 <sys/cdefs.h>
index 4fba8452bf64da292300d1b9ff85b67bd26819d9..a56c3e9cd0bd40160468827477f03ce9107f208d 100644 (file)
@@ -26,9 +26,6 @@
 # include <stddef.h>
 #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 <sys/cdefs.h>
diff --git a/util.h b/util.h
index 4fba8452bf64da292300d1b9ff85b67bd26819d9..a56c3e9cd0bd40160468827477f03ce9107f208d 100644 (file)
--- a/util.h
+++ b/util.h
@@ -26,9 +26,6 @@
 # include <stddef.h>
 #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 <sys/cdefs.h>