Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/compat Declare and define strnlen if necessary.



details:   https://anonhg.NetBSD.org/src/rev/9cce960be291
branches:  trunk
changeset: 325849:9cce960be291
user:      apb <apb%NetBSD.org@localhost>
date:      Thu Jan 09 11:31:12 2014 +0000

description:
Declare and define strnlen if necessary.

diffstat:

 tools/compat/Makefile      |  5 +++--
 tools/compat/compat_defs.h |  5 ++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r dbfca2b229a8 -r 9cce960be291 tools/compat/Makefile
--- a/tools/compat/Makefile     Thu Jan 09 11:27:31 2014 +0000
+++ b/tools/compat/Makefile     Thu Jan 09 11:31:12 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.70 2013/12/11 01:24:08 joerg Exp $
+#      $NetBSD: Makefile,v 1.71 2014/01/09 11:31:12 apb Exp $
 
 HOSTLIB=       nbcompat
 
@@ -17,7 +17,8 @@
                setenv.c setgroupent.c \
                setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
                sha256hl.c sha384hl.c sha512hl.c snprintb.c snprintf.c \
-               stat_flags.c strlcat.c strlcpy.c strmode.c strndup.c \
+               stat_flags.c strlcat.c strlcpy.c strmode.c \
+               strndup.c strnlen.c \
                strsep.c strsuftoll.c strtoll.c \
                unvis.c vis.c err.c errx.c verr.c verrx.c \
                vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
diff -r dbfca2b229a8 -r 9cce960be291 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Thu Jan 09 11:27:31 2014 +0000
+++ b/tools/compat/compat_defs.h        Thu Jan 09 11:31:12 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_defs.h,v 1.93 2013/10/24 13:59:47 apb Exp $     */
+/*     $NetBSD: compat_defs.h,v 1.94 2014/01/09 11:31:12 apb Exp $     */
 
 #ifndef        __NETBSD_COMPAT_DEFS_H__
 #define        __NETBSD_COMPAT_DEFS_H__
@@ -415,6 +415,9 @@
 #if !HAVE_DECL_STRNDUP
 char           *strndup(const char *, size_t);
 #endif
+#if !HAVE_DECL_STRNLEN
+char           *strnlen(const char *, size_t);
+#endif
 #if !HAVE_DECL_LCHFLAGS
 int            lchflags(const char *, unsigned long);
 #endif



Home | Main Index | Thread Index | Old Index