2013-05-09 01:32:31 +07:00
|
|
|
/* prototypes for strlcpy() and strlcat() */
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2017-12-30 22:14:22 +06:00
|
|
|
#if defined __WATCOMC__ && __WATCOMC__ >= 1240
|
|
|
|
/* OpenWatcom introduced BSD "safe string functions" with version 1.4 */
|
2013-05-09 01:32:31 +07:00
|
|
|
#define HAVE_SAFESTR
|
|
|
|
#endif
|
|
|
|
|
2018-08-12 02:19:51 +06:00
|
|
|
#if defined strlcpy && !defined HAVE_STRLCPY
|
2017-12-30 22:14:22 +06:00
|
|
|
#define HAVE_STRLCPY
|
|
|
|
#endif
|
2018-08-12 02:19:51 +06:00
|
|
|
#if defined strlcat && !defined HAVE_STRLCAT
|
2017-12-30 22:14:22 +06:00
|
|
|
#define HAVE_STRLCAT
|
|
|
|
#endif
|
|
|
|
|
2015-04-04 23:21:06 +06:00
|
|
|
#if defined HAVE_SAFESTR
|
|
|
|
#define HAVE_STRLCPY
|
|
|
|
#define HAVE_STRLCAT
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined HAVE_STRLCPY
|
2013-05-09 01:32:31 +07:00
|
|
|
|
|
|
|
size_t
|
|
|
|
strlcpy(char *dst, const char *src, size_t siz);
|
|
|
|
|
2015-04-04 23:21:06 +06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined HAVE_STRLCAT
|
|
|
|
|
2013-05-09 01:32:31 +07:00
|
|
|
size_t
|
|
|
|
strlcat(char *dst, const char *src, size_t siz);
|
|
|
|
|
|
|
|
#endif
|