2010-08-08 10:06:34 +02:00
|
|
|
#ifndef UTIL_BSDSTRING_H
|
|
|
|
#define UTIL_BSDSTRING_H
|
|
|
|
|
2012-06-03 20:59:21 +02:00
|
|
|
#include <stddef.h>
|
2015-05-15 06:43:47 +02:00
|
|
|
extern int wrptr(char **ptr, size_t * size, size_t bytes);
|
2012-05-29 19:45:46 +02:00
|
|
|
|
|
|
|
#ifndef HAVE_STRLCPY
|
|
|
|
extern size_t strlcpy(char *dst, const char *src, size_t siz);
|
2010-08-08 10:06:34 +02:00
|
|
|
#endif
|
|
|
|
|
2012-05-29 19:45:46 +02:00
|
|
|
#ifndef HAVE_STRLCAT
|
|
|
|
extern size_t strlcat(char *dst, const char *src, size_t siz);
|
|
|
|
#endif
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2012-05-29 19:45:46 +02:00
|
|
|
#ifndef HAVE_SLPRINTF
|
|
|
|
extern size_t slprintf(char * dst, size_t size, const char * format, ...);
|
2010-08-08 10:06:34 +02:00
|
|
|
#endif
|
|
|
|
|
2012-05-29 19:45:46 +02:00
|
|
|
#define WARN_STATIC_BUFFER() log_warning("static buffer too small in %s:%d\n", __FILE__, __LINE__)
|
2015-07-08 18:27:27 +02:00
|
|
|
#define INFO_STATIC_BUFFER() log_info("static buffer too small in %s:%d\n", __FILE__, __LINE__)
|
2012-05-29 19:45:46 +02:00
|
|
|
|
2010-08-08 10:06:34 +02:00
|
|
|
#endif
|