]> Pileus Git - ~andy/fetchmail/blobdiff - strlcat.c
Minor bug fixes for socket.c
[~andy/fetchmail] / strlcat.c
index db9d43c225038c58bb6a17b478752a9dd433fd16..22428d6829a893886a5dec60a785afcf105aa7e8 100644 (file)
--- a/strlcat.c
+++ b/strlcat.c
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strlcat.c,v 1.16 2003/10/27 00:12:42 lukem Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef _LIBC
-#include "namespace.h"
-#endif
 #include <sys/types.h>
 #include <assert.h>
 #include <string.h>
 
-#ifdef _LIBC
-# ifdef __weak_alias
-__weak_alias(strlcat, _strlcat)
-# endif
-#endif
+#include "fm_strl.h"
 
-#if !HAVE_STRLCAT
+#ifndef HAVE_STRLCAT
 /*
  * Appends src to string dst of size siz (unlike strncat, siz is the
  * full size of dst, not space left).  At most siz-1 characters
@@ -48,23 +32,13 @@ __weak_alias(strlcat, _strlcat)
  * If retval >= siz, truncation occurred.
  */
 size_t
-#ifdef _LIBC
-_strlcat(dst, src, siz)
-#else
-strlcat(dst, src, siz)
-#endif
-       char *dst;
-       const char *src;
-       size_t siz;
+strlcat(char *dst, const char *src, size_t siz)
 {
        char *d = dst;
        const char *s = src;
        size_t n = siz;
        size_t dlen;
 
-       _DIAGASSERT(dst != NULL);
-       _DIAGASSERT(src != NULL);
-
        /* Find the end of dst and adjust bytes left but don't go past end */
        while (n-- != 0 && *d != '\0')
                d++;