2 * Copyright (C) 2005-2008 Kay Sievers <kay.sievers@vrfy.org>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include <sys/types.h>
24 #include "udev_sysdeps.h"
27 size_t strlcpy(char *dst, const char *src, size_t size)
40 /* If size == 0 there is no space for a final null... */
46 size_t strlcat(char *dst, const char *src, size_t size)
53 while (bytes < size && *q) {
58 return (bytes + strlen(src));
69 #endif /* HAVE_STRLCPY */