server/src/common/util/bsdstring.h
Enno Rehling a1865ee2fa - Undo modifications to strlcpy from rev 3631
- Many more warnings when buffers too small.
2007-09-01 23:40:58 +00:00

23 lines
555 B
C

#ifndef UTIL_BSDSTRING_H
#define UTIL_BSDSTRING_H
#ifdef HAVE_INLINE
# include "bsdstring.c"
#else
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);
#endif
#if !defined(HAVE_STRLCPY)
# define HAVE_STRLCPY
#endif
#define WARN_STATIC_BUFFER() log_warning(("static buffer too small in %s:%d\n", __FILE__, __LINE__))
#if !defined(HAVE_STRLPRINTF)
# define HAVE_STRLPRINTF
# define slprintf snprintf
#endif
#endif