Add prototypes for strlcpy/strlcat

This commit is contained in:
Julien Cristau 2008-10-26 11:37:11 +01:00
parent eadf90aa65
commit 5244690a5e
4 changed files with 10 additions and 0 deletions

View File

@ -72,6 +72,9 @@
/* Support SHM */ /* Support SHM */
#undef HAS_SHM #undef HAS_SHM
/* Have the 'strlcpy' function */
#undef HAS_STRLCPY
/* Define to 1 if you have the <asm/mtrr.h> header file. */ /* Define to 1 if you have the <asm/mtrr.h> header file. */
#undef HAVE_ASM_MTRR_H #undef HAVE_ASM_MTRR_H

View File

@ -456,6 +456,11 @@ extern int xstrncasecmp(const char *s1, const char *s2, size_t n);
extern char *xstrcasestr(const char *s, const char *find); extern char *xstrcasestr(const char *s, const char *find);
#endif #endif
#ifndef HAS_STRLCPY
extern size_t strlcpy(char *dst, const char *src, size_t siz);
extern size_t strlcat(char *dst, const char *src, size_t siz);
#endif
/* Logging. */ /* Logging. */
typedef enum _LogParameter { typedef enum _LogParameter {
XLOG_FLUSH, XLOG_FLUSH,

View File

@ -21,6 +21,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <string.h> #include <string.h>
#include "os.h"
/* /*
* Appends src to string dst of size siz (unlike strncat, siz is the * Appends src to string dst of size siz (unlike strncat, siz is the

View File

@ -20,6 +20,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <string.h> #include <string.h>
#include "os.h"
/* /*
* Copy src to string dst of size siz. At most siz-1 characters * Copy src to string dst of size siz. At most siz-1 characters