compiling FreeBSD date on Linux

Polytropon freebsd at
Sat May 23 21:19:21 UTC 2009

Te strlcpy function is part of the system's C library, libc.
It is declared in string.h. Did you

	#include <string.h>

and check if the Linux C library has this function included?
If it has, "man strlcpy" should mention it. Oh wait, when
talking about Linux, it's possible that there is no manpage
for this library function.

The *l* string functions have been introduced in OpenBSD
and FreeBSD to get rid of "overflow problems" when using
strcpy and strcat, because they take a length parameter,
which is size_t size.

These are their signatures:

	size_t strlcpy(char *dst, const char *src, size_t size);
	size_t strlcat(char *dst, const char *src, size_t size);

Check if Linux has them, too, and if yes, that they have
the same parameter definition.

>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list