This patch adds the g_strlcpy and g_strlcat functions to glib to support safe manipulation of fixed-length string buffers. These functions were originally developed by Todd Miller (under the names strlcpy and strlcat). They are available on many (but not all) Unix-like systems (such as OpenBSD, FreeBSD, and Solaris); see ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.3 and http://www.openbsd.org/security.html. This version detects if there's a strlcpy/strlcat on the system, and if so, calls it (i.e. it's a wrapper), otherwise, it provides an implementation. I posted this patch to the mailing list & have received no negative feedback. This patch I'm sending does have one minor change, I changed all "char" to "gchar" to be consistent with glib conventions.