summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2002-08-07 01:04:34 +0000
committerPeter Johnson <peter@tortall.net>2002-08-07 01:04:34 +0000
commitda070d59647f30e0ef234496ab34a8d33854ece5 (patch)
tree123979ce6470ce6dac23d6f99b0ff11c2da91bce /util.h
parent6727a189ab82a7939b6da1604d2869c317629c5d (diff)
downloadyasm-da070d59647f30e0ef234496ab34a8d33854ece5.tar.gz
Move strndup() declaration outside !DMALLOC #ifdef, as it's not defined by
the dmalloc library. svn path=/trunk/yasm/; revision=661
Diffstat (limited to 'util.h')
-rw-r--r--util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.h b/util.h
index 05d8d782..51bc282e 100644
--- a/util.h
+++ b/util.h
@@ -126,7 +126,6 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
#else
/* strdup() implementation with error checking (using xmalloc). */
/*@only@*/ char *xstrdup(const char *str);
-/*@only@*/ char *xstrndup(const char *str, size_t len);
/* Error-checking memory allocation routines in xmalloc.c. */
/*@only@*/ /*@out@*/ void *xmalloc(size_t size);
@@ -136,6 +135,8 @@ int strncasecmp(const char *s1, const char *s2, size_t n);
void xfree(/*@only@*/ /*@out@*/ /*@null@*/ void *p) /*@modifies p@*/;
#endif
+/*@only@*/ char *xstrndup(const char *str, size_t len);
+
/* Bit-counting: used primarily by HAMT but also in a few other places. */
#define SK5 0x55555555
#define SK3 0x33333333