Module Name: src
Committed By: christos
Date: Sat Aug 11 16:24:59 UTC 2018
Modified Files:
src/tools/compat: Makefile compat_defs.h configure configure.ac
nbtool_config.h.in
Log Message:
Add strcasecmp
To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/tools/compat/Makefile
cvs rdiff -u -r1.112 -r1.113 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.90 -r1.91 src/tools/compat/configure
cvs rdiff -u -r1.91 -r1.92 src/tools/compat/configure.ac
cvs rdiff -u -r1.44 -r1.45 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.83 src/tools/compat/Makefile:1.84
--- src/tools/compat/Makefile:1.83 Tue May 1 15:59:46 2018
+++ src/tools/compat/Makefile Sat Aug 11 12:24:59 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.83 2018/05/01 19:59:46 christos Exp $
+# $NetBSD: Makefile,v 1.84 2018/08/11 16:24:59 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 \
- strndup.c strnlen.c \
+ strcasecmp.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/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.112 src/tools/compat/compat_defs.h:1.113
--- src/tools/compat/compat_defs.h:1.112 Wed Jun 13 00:17:43 2018
+++ src/tools/compat/compat_defs.h Sat Aug 11 12:24:59 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_defs.h,v 1.112 2018/06/13 04:17:43 maya Exp $ */
+/* $NetBSD: compat_defs.h,v 1.113 2018/08/11 16:24:59 christos Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@@ -494,6 +494,9 @@ char *strndup(const char *, size_t);
#if !HAVE_DECL_STRNLEN
size_t strnlen(const char *, size_t);
#endif
+#if !HAVE_DECL_STRCASECMP
+int strcasecmp(const char *, const char *);
+#endif
#if !HAVE_DECL_LCHFLAGS
int lchflags(const char *, unsigned long);
#endif
Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.90 src/tools/compat/configure:1.91
--- src/tools/compat/configure:1.90 Wed Jun 13 00:17:43 2018
+++ src/tools/compat/configure Sat Aug 11 12:24:59 2018
@@ -5160,7 +5160,7 @@ for ac_func in atoll asprintf asnprintf
pwrite raise_default_signal random reallocarr setenv \
setgroupent setprogname setpassent \
snprintb_m snprintf strlcat strlcpy strmode \
- strndup strnlen strsep strsuftoll strtoi strtoll strtou \
+ strcasecmp 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`
@@ -5254,6 +5254,19 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PWCACHE_GROUPDB $ac_have_decl
_ACEOF
+ac_fn_c_check_decl "$LINENO" "strcasecmp" "ac_cv_have_decl_strcasecmp" "
+#include <string.h>
+
+"
+if test "x$ac_cv_have_decl_strcasecmp" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRCASECMP $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.91 src/tools/compat/configure.ac:1.92
--- src/tools/compat/configure.ac:1.91 Wed Jun 13 00:17:43 2018
+++ src/tools/compat/configure.ac Sat Aug 11 12:24:59 2018
@@ -1,4 +1,4 @@
-# $NetBSD: configure.ac,v 1.91 2018/06/13 04:17:43 maya Exp $
+# $NetBSD: configure.ac,v 1.92 2018/08/11 16:24:59 christos Exp $
#
# Autoconf definition file for libnbcompat.
#
@@ -192,7 +192,7 @@ AC_CHECK_FUNCS(atoll asprintf asnprintf
pwrite raise_default_signal random reallocarr setenv \
setgroupent setprogname setpassent \
snprintb_m snprintf strlcat strlcpy strmode \
- strndup strnlen strsep strsuftoll strtoi strtoll strtou \
+ strcasecmp 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 +201,7 @@ 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([strlcpy, strlcat, strndup, strnlen, strsep],,,[
+AC_CHECK_DECLS([strcasecmp, strlcpy, strlcat, strndup, strnlen, strsep],,,[
#include <string.h>
])
AC_CHECK_DECLS([strsuftoll, mi_vector_hash],,,[#include <stdlib.h>])
Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.44 src/tools/compat/nbtool_config.h.in:1.45
--- src/tools/compat/nbtool_config.h.in:1.44 Wed Jun 13 00:17:43 2018
+++ src/tools/compat/nbtool_config.h.in Sat Aug 11 12:24:59 2018
@@ -1,6 +1,6 @@
/* nbtool_config.h.in. Generated from configure.ac by autoheader. */
-/* $NetBSD: nbtool_config.h.in,v 1.44 2018/06/13 04:17:43 maya Exp $ */
+/* $NetBSD: nbtool_config.h.in,v 1.45 2018/08/11 16:24:59 christos Exp $ */
#ifndef __NETBSD_NBTOOL_CONFIG_H__
#define __NETBSD_NBTOOL_CONFIG_H__
@@ -310,6 +310,10 @@
don't. */
#undef HAVE_DECL_SNPRINTF
+/* Define to 1 if you have the declaration of `strcasecmp', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRCASECMP
+
/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
don't. */
#undef HAVE_DECL_STRLCAT
@@ -634,6 +638,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H