try to fix the build

This commit is contained in:
Enno Rehling 2017-12-11 18:42:35 +01:00
parent d48b9611e1
commit af7cc02388
3 changed files with 1 additions and 11 deletions

View File

@ -55,7 +55,6 @@ int atoi36(const char *str)
const char *itoab_r(int i, int base, char *s, size_t len) const char *itoab_r(int i, int base, char *s, size_t len)
{ {
char *dst; char *dst;
static int index = 0; /* STATIC_XCALL: used across calls */
assert(len > 2); assert(len > 2);
dst = s + len - 2; dst = s + len - 2;

View File

@ -35,8 +35,6 @@ int wrptr(char **ptr, size_t * size, int result)
return ERANGE; return ERANGE;
} }
#ifndef HAVE_STRLCPY
#define HAVE_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t siz) size_t strlcpy(char *dst, const char *src, size_t siz)
{ /* copied from OpenBSD source code */ { /* copied from OpenBSD source code */
register char *d = dst; register char *d = dst;
@ -61,7 +59,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz)
return (s - src - 1); /* count does not include NUL */ return (s - src - 1); /* count does not include NUL */
} }
#endif
char * strlcpy_w(char *dst, const char *src, size_t *siz, const char *err, const char *file, int line) char * strlcpy_w(char *dst, const char *src, size_t *siz, const char *err, const char *file, int line)
{ {
@ -78,8 +75,6 @@ char * strlcpy_w(char *dst, const char *src, size_t *siz, const char *err, const
return buf; return buf;
} }
#ifndef HAVE_STRLCAT
#define HAVE_STRLCAT
size_t strlcat(char *dst, const char *src, size_t siz) size_t strlcat(char *dst, const char *src, size_t siz)
{ {
register char *d = dst; register char *d = dst;
@ -106,10 +101,7 @@ size_t strlcat(char *dst, const char *src, size_t siz)
return (dlen + (s - src)); /* count does not include NUL */ return (dlen + (s - src)); /* count does not include NUL */
} }
#endif
#ifndef HAVE_SLPRINTF
#define HAVE_SLPRINTF
size_t slprintf(char * dst, size_t size, const char * format, ...) size_t slprintf(char * dst, size_t size, const char * format, ...)
{ {
va_list args; va_list args;
@ -125,4 +117,3 @@ size_t slprintf(char * dst, size_t size, const char * format, ...)
return (size_t)result; return (size_t)result;
} }
#endif

View File

@ -9,7 +9,7 @@ int wrptr(char **ptr, size_t * size, int bytes);
#undef HAVE_SLPRINTF #undef HAVE_SLPRINTF
#ifdef HAVE_BSDSTRING #ifdef HAVE_BSDSTRING
#define HAVE_STRLCAT #define HAVE_STRLCAT
#define HAVE_SLPRINT #define HAVE_SLPRINTF
#define HAVE_STRLCPY #define HAVE_STRLCPY
#else #else
#include <string.h> #include <string.h>