From 5da60b9df1d52cc16a5a0bfcef1c8f4f624b3a3a Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 12 Jun 2007 07:12:29 +0000 Subject: Eliminate my_strlcpy. --- cpukit/shttpd/defs.h | 7 +++++++ cpukit/shttpd/string.c | 2 ++ 2 files changed, 9 insertions(+) (limited to 'cpukit/shttpd') diff --git a/cpukit/shttpd/defs.h b/cpukit/shttpd/defs.h index 1f0c81b743..a1e871a4f4 100644 --- a/cpukit/shttpd/defs.h +++ b/cpukit/shttpd/defs.h @@ -374,9 +374,16 @@ extern void log_access(FILE *fp, const struct conn *c); /* * string.c */ +#ifndef HAVE_STRLCPY extern void my_strlcpy(register char *, register const char *, size_t); +#else +#include +#define my_strlcpy(d,s,l) strlcpy(d,s,l) +#endif + extern int my_strncasecmp(register const char *, register const char *, size_t); + #ifndef HAVE_STRNDUP extern char *my_strndup(const char *ptr, size_t len); #else diff --git a/cpukit/shttpd/string.c b/cpukit/shttpd/string.c index 8e9023cf31..34e5a721fa 100644 --- a/cpukit/shttpd/string.c +++ b/cpukit/shttpd/string.c @@ -10,6 +10,7 @@ #include "defs.h" +#ifndef HAVE_STRLCPY void my_strlcpy(register char *dst, register const char *src, size_t n) { @@ -17,6 +18,7 @@ my_strlcpy(register char *dst, register const char *src, size_t n) *dst++ = *src++; *dst = '\0'; } +#endif int my_strncasecmp(const char *str1, const char *str2, size_t len) -- cgit v1.2.3