2010-08-08 10:06:34 +02:00
|
|
|
#ifndef UTIL_BSDSTRING_H
|
|
|
|
#define UTIL_BSDSTRING_H
|
|
|
|
|
|
|
|
#ifdef HAVE_INLINE
|
|
|
|
# include "bsdstring.c"
|
|
|
|
#else
|
2011-03-07 08:02:35 +01:00
|
|
|
extern size_t strlcpy(char *dst, const char *src, size_t siz);
|
|
|
|
extern size_t strlcat(char *dst, const char *src, size_t siz);
|
|
|
|
extern int wrptr(char **ptr, size_t * size, int bytes);
|
2010-08-08 10:06:34 +02:00
|
|
|
#endif
|
|
|
|
|
2012-05-17 00:52:37 +02:00
|
|
|
#define WARN_STATIC_BUFFER() log_warning("static buffer too small in %s:%d\n", __FILE__, __LINE__)
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
#if !defined(HAVE_STRLPRINTF)
|
|
|
|
# define HAVE_STRLPRINTF
|
|
|
|
# define slprintf snprintf
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|