On Thu, Jul 24, 2008 at 10:35:36PM +0200, Martin Toft wrote:
On Thu, Jul 24, 2008 at 02:20:22PM -0600, Theo de Raadt wrote:
+#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
+#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
That is utterly and
On Wed, Jul 23, 2008 at 10:55:01PM +0200, Martin Toft wrote:
I'm trying to compile cwm (/usr/xenocara/app/cwm) on Linux, as I would
like to use this very supreme window manager on all my non-OpenBSD
systems as well. The version of cwm that I'm working with is from
yesterday's -current (23rd of
+#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
+#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
That is utterly and completely wrong.
6. Compile and link:
$ for i in *.c; do gcc -I /usr/include/freetype2 -c $i; done
$ gcc -lXft -lXrender -lX11 -lXau -lXdmcp -lXext -lfontconfig -lexpat
-lfreetype -lz -o cwm *.o
Most linux distributions carry a pmake package which provides the
a bsd.prog.mk and thus support for the
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
On Thu, Jul 24, 2008 at 02:20:22PM -0600, Theo de Raadt wrote:
+#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
+#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
That is utterly and completely wrong.
Yep, I'm a noob when it comes to these kinds of
+#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
+#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
strlcpy() and strlcat() return size_t. strncpy() and strncat() return
char *. These #define do not take care of this (among other things).
7 matches
Mail list logo