On Thu, Jul 24, 2008 at 10:01:50PM +0200, Martin Toft wrote:
> +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
> +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))

To be a bit more specific than Theo, don't believe idiots like Ulrich
Drepper.

There's a *reason* for strlcpy and strlcat.
strncpy and strncat are bogus. They're almost never the solution.

Accept no substitute.

On any lesser system (and that's mostly linux these days), you must ship
a copy of strlcat and strlcpy.

Fortunately the source code for these is small!

And it's free! 
nice licence! 
no obnoxious GPL!

Reply via email to