Date: Tue, 4 Oct 2011 23:53:47 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r226029 - in head/sys: conf libkern sys Message-ID: <201110042353.p94NrlTG084938@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Tue Oct 4 23:53:47 2011 New Revision: 226029 URL: http://svn.freebsd.org/changeset/base/226029 Log: Add strnlen() to libkern. Added: head/sys/libkern/strnlen.c - copied, changed from r225884, head/lib/libc/string/strnlen.c Modified: head/sys/conf/files head/sys/sys/libkern.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Oct 4 22:28:06 2011 (r226028) +++ head/sys/conf/files Tue Oct 4 23:53:47 2011 (r226029) @@ -2553,6 +2553,7 @@ libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncmp.c standard libkern/strncpy.c standard +libkern/strnlen.c standard libkern/strsep.c standard libkern/strspn.c standard libkern/strstr.c standard Copied and modified: head/sys/libkern/strnlen.c (from r225884, head/lib/libc/string/strnlen.c) ============================================================================== --- head/lib/libc/string/strnlen.c Fri Sep 30 08:05:58 2011 (r225884, copy source) +++ head/sys/libkern/strnlen.c Tue Oct 4 23:53:47 2011 (r226029) @@ -27,7 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <string.h> +#include <sys/libkern.h> size_t strnlen(const char *s, size_t maxlen) Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Tue Oct 4 22:28:06 2011 (r226028) +++ head/sys/sys/libkern.h Tue Oct 4 23:53:47 2011 (r226029) @@ -116,6 +116,7 @@ size_t strlen(const char *); int strncasecmp(const char *, const char *, size_t); int strncmp(const char *, const char *, size_t); char *strncpy(char * __restrict, const char * __restrict, size_t); +size_t strnlen(const char *, size_t); char *strsep(char **, const char *delim); size_t strspn(const char *, const char *); char *strstr(const char *, const char *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110042353.p94NrlTG084938>