From: H.Merijn Brand Date: Mon, 1 Nov 2004 12:51:52 +0000 (+0000) Subject: Since strlcat/strlcpy are not argument/return value compatible X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b4d4ebb4e4c360bece24cfbbd8a3734e236b948a;p=p5sagit%2Fp5-mst-13.2.git Since strlcat/strlcpy are not argument/return value compatible with strncat/strncpy, replace the misleading defines with comment p4raw-id: //depot/perl@23455 --- diff --git a/handy.h b/handy.h index 904b67c..af4890e 100644 --- a/handy.h +++ b/handy.h @@ -159,17 +159,12 @@ typedef U64TYPE U64; # endif #endif -/* H.Merijn Brand [ 31 Oct 2004 ] - * Not (yet) used at top level, but mention them for metaconfig */ -#ifdef HAS_STRLCAT -# define STRNCAT strlcat -#else -# define STRNCAT strncat -#endif -#ifdef HAS_STRLCPY -# define STRNCPY strlcpy -#else -# define STRNCPY strncpy +/* H.Merijn Brand [ 01 Nov 2004 ] */ +#if defined(HAS_STRLCAT) || defined(HAS_STRLCPY) +/* Not (yet) used at top level, but mention them for metaconfig + * Read http://www.courtesan.com/todd/papers/strlcpy.html + * for the discussion of why replacing strncat/strncpy with + * strlcat/strlcpy would be wise */ #endif /* Mention I8SIZE, U8SIZE, I16SIZE, U16SIZE, I32SIZE, U32SIZE,