Module Name: src
Committed By: christos
Date: Thu Aug 16 12:03:36 UTC 2018
Modified Files:
src/tools/compat: Makefile configure configure.ac nbtool_config.h.in
Log Message:
add strncasecmp
To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/tools/compat/Makefile
cvs rdiff -u -r1.91 -r1.92 src/tools/compat/configure
cvs rdiff -u -r1.92 -r1.93 src/tools/compat/configure.ac
cvs rdiff -u -r1.45 -r1.46 src/tools/compat/nbtool_config.h.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.84 src/tools/compat/Makefile:1.85
--- src/tools/compat/Makefile:1.84 Sat Aug 11 12:24:59 2018
+++ src/tools/compat/Makefile Thu Aug 16 08:03:36 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.84 2018/08/11 16:24:59 christos Exp $
+# $NetBSD: Makefile,v 1.85 2018/08/16 12:03:36 christos Exp $
HOSTLIB= nbcompat
@@ -19,7 +19,7 @@ SRCS= atoll.c basename.c cdbr.c cdbw.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 \
- strcasecmp.c strndup.c strnlen.c \
+ strcasecmp.c strncasecmp.c strndup.c strnlen.c \
strsep.c strsuftoll.c strtoll.c \
strtoi.c strtou.c \
unvis.c vis.c err.c errx.c errc.c verr.c verrx.c verrc.c \
Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.91 src/tools/compat/configure:1.92
--- src/tools/compat/configure:1.91 Sat Aug 11 12:24:59 2018
+++ src/tools/compat/configure Thu Aug 16 08:03:36 2018
@@ -5160,7 +5160,8 @@ for ac_func in atoll asprintf asnprintf
pwrite raise_default_signal random reallocarr setenv \
setgroupent setprogname setpassent \
snprintb_m snprintf strlcat strlcpy strmode \
- strcasecmp strndup strnlen strsep strsuftoll strtoi strtoll strtou \
+ strcasecmp strncasecmp strndup strnlen strsep strsuftoll strtoi \
+ strtoll strtou \
user_from_uid uid_from_user vasprintf vasnprintf vsnprintf
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -5267,6 +5268,19 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRCASECMP $ac_have_decl
_ACEOF
+ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "
+#include <string.h>
+
+"
+if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNCASECMP $ac_have_decl
+_ACEOF
ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "
#include <string.h>
Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.92 src/tools/compat/configure.ac:1.93
--- src/tools/compat/configure.ac:1.92 Sat Aug 11 12:24:59 2018
+++ src/tools/compat/configure.ac Thu Aug 16 08:03:36 2018
@@ -1,4 +1,4 @@
-# $NetBSD: configure.ac,v 1.92 2018/08/11 16:24:59 christos Exp $
+# $NetBSD: configure.ac,v 1.93 2018/08/16 12:03:36 christos Exp $
#
# Autoconf definition file for libnbcompat.
#
@@ -192,7 +192,8 @@ AC_CHECK_FUNCS(atoll asprintf asnprintf
pwrite raise_default_signal random reallocarr setenv \
setgroupent setprogname setpassent \
snprintb_m snprintf strlcat strlcpy strmode \
- strcasecmp strndup strnlen strsep strsuftoll strtoi strtoll strtou \
+ strcasecmp strncasecmp strndup strnlen strsep strsuftoll strtoi \
+ strtoll strtou \
user_from_uid uid_from_user vasprintf vasnprintf vsnprintf)
AC_CHECK_DECLS([user_from_uid, uid_from_user, pwcache_userdb],,,[
@@ -201,7 +202,8 @@ AC_CHECK_DECLS([user_from_uid, uid_from_
AC_CHECK_DECLS([group_from_gid, gid_from_group, pwcache_groupdb],,,[
#include <grp.h>
])
-AC_CHECK_DECLS([strcasecmp, strlcpy, strlcat, strndup, strnlen, strsep],,,[
+AC_CHECK_DECLS([strcasecmp, strncasecmp, strlcpy, strlcat, strndup,
+ strnlen, strsep],,,[
#include <string.h>
])
AC_CHECK_DECLS([strsuftoll, mi_vector_hash],,,[#include <stdlib.h>])
@@ -210,7 +212,8 @@ AC_CHECK_DECLS([lchflags, lchmod, lchown
#include <unistd.h>
])
-AC_CHECK_DECLS([err, errc, errx, verrc, verrx, warn, warnc, warnx, vwarnc, vwarnx],,, [
+AC_CHECK_DECLS([err, errc, errx, verrc, verrx, warn, warnc, warnx, vwarnc,
+ vwarnx],,,[
#ifdef HAVE_ERR_H
#include <err.h>
#endif
Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.45 src/tools/compat/nbtool_config.h.in:1.46
--- src/tools/compat/nbtool_config.h.in:1.45 Sat Aug 11 12:24:59 2018
+++ src/tools/compat/nbtool_config.h.in Thu Aug 16 08:03:36 2018
@@ -1,6 +1,6 @@
/* nbtool_config.h.in. Generated from configure.ac by autoheader. */
-/* $NetBSD: nbtool_config.h.in,v 1.45 2018/08/11 16:24:59 christos Exp $ */
+/* $NetBSD: nbtool_config.h.in,v 1.46 2018/08/16 12:03:36 christos Exp $ */
#ifndef __NETBSD_NBTOOL_CONFIG_H__
#define __NETBSD_NBTOOL_CONFIG_H__
@@ -326,6 +326,10 @@
don't. */
#undef HAVE_DECL_STRMODE
+/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRNCASECMP
+
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
don't. */
#undef HAVE_DECL_STRNDUP
@@ -656,6 +660,9 @@
/* Define to 1 if you have the `strmode' function. */
#undef HAVE_STRMODE
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP