Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 2009 23:19:12 +0200
From:      Polytropon <freebsd@edvax.de>
To:        francis keyes <fkeymo@gmail.com>
Cc:        freebsd-questions@freebsd.org, Roland Smith <rsmith@xs4all.nl>, Polytropon <freebsd@edvax.de>, Chuck, Robey <chuckr@telenix.org>
Subject:   Re: compiling FreeBSD date on Linux
Message-ID:  <20090523231912.74eaea58.freebsd@edvax.de>
In-Reply-To: <d64607cc0905231300lda83df3v65d61d88d207b1a2@mail.gmail.com>
References:  <d64607cc0905191419p621f7e65tf5515d1d3696bfa0@mail.gmail.com> <20090520000137.3d46fcb2.freebsd@edvax.de> <4A135119.8010007@telenix.org> <d64607cc0905201045i36084a34g2a6c0d4e9d5f750d@mail.gmail.com> <20090520192011.GA97805@slackbox.xs4all.nl> <d64607cc0905211708u2d2c4e75q95a804f70ce03eb7@mail.gmail.com> <20090522075840.GA94412@slackbox.xs4all.nl> <d64607cc0905231300lda83df3v65d61d88d207b1a2@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090523231912.74eaea58.freebsd>