From: Peter Johnson Date: Wed, 7 Aug 2002 01:04:34 +0000 (-0000) Subject: Move strndup() declaration outside !DMALLOC #ifdef, as it's not defined by X-Git-Tag: v0.2.0~190 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da070d59647f30e0ef234496ab34a8d33854ece5;p=yasm Move strndup() declaration outside !DMALLOC #ifdef, as it's not defined by the dmalloc library. svn path=/trunk/yasm/; revision=661 --- diff --git a/libyasm/util.h b/libyasm/util.h index 05d8d782..51bc282e 100644 --- a/libyasm/util.h +++ b/libyasm/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 diff --git a/src/util.h b/src/util.h index 05d8d782..51bc282e 100644 --- a/src/util.h +++ b/src/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 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