Module Name: src
Committed By: christos
Date: Thu Aug 30 12:05:35 UTC 2018
Modified Files:
src/tools/compat: Makefile compat_defs.h configure configure.ac
nbtool_config.h.in
Log Message:
deal with getsubopt and strncasecmp (needed by mdocml)
To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/tools/compat/Makefile
cvs rdiff -u -r1.113 -r1.114 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.92 -r1.93 src/tools/compat/configure
cvs rdiff -u -r1.93 -r1.94 src/tools/compat/configure.ac
cvs rdiff -u -r1.46 -r1.47 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.85 src/tools/compat/Makefile:1.86
--- src/tools/compat/Makefile:1.85 Thu Aug 16 08:03:36 2018
+++ src/tools/compat/Makefile Thu Aug 30 08:05:34 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.85 2018/08/16 12:03:36 christos Exp $
+# $NetBSD: Makefile,v 1.86 2018/08/30 12:05:34 christos Exp $
HOSTLIB= nbcompat
@@ -7,7 +7,7 @@ HOSTLIB= nbcompat
SRCS= atoll.c basename.c cdbr.c cdbw.c dirname.c \
dprintf.c fgetln.c flock.c fparseln.c fpurge.c \
getcap.c getline.c getmode.c getopt_long.c gettemp.c \
- heapsort.c \
+ heapsort.c getsubopt.c \
issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
mi_vector_hash.c mkdtemp.c \
Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.113 src/tools/compat/compat_defs.h:1.114
--- src/tools/compat/compat_defs.h:1.113 Sat Aug 11 12:24:59 2018
+++ src/tools/compat/compat_defs.h Thu Aug 30 08:05:34 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_defs.h,v 1.113 2018/08/11 16:24:59 christos Exp $ */
+/* $NetBSD: compat_defs.h,v 1.114 2018/08/30 12:05:34 christos Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@@ -255,6 +255,10 @@ extern char *optarg;
extern int optind, opterr, optopt;
#endif
+#if !HAVE_DECL_GETSUBOPT
+int getsubopt(char **, char * const *, char **);
+#endif
+
#if !HAVE_DECL_DIRNAME
char *dirname(char *);
#endif
@@ -497,6 +501,9 @@ size_t strnlen(const char *, size_t);
#if !HAVE_DECL_STRCASECMP
int strcasecmp(const char *, const char *);
#endif
+#if !HAVE_DECL_STRNCASECMP
+int strncasecmp(const char *, const char *, size_t);
+#endif
#if !HAVE_DECL_LCHFLAGS
int lchflags(const char *, unsigned long);
#endif
Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.92 src/tools/compat/configure:1.93
--- src/tools/compat/configure:1.92 Thu Aug 16 08:03:36 2018
+++ src/tools/compat/configure Thu Aug 30 08:05:34 2018
@@ -4717,6 +4717,19 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_REALLOCARR $ac_have_decl
_ACEOF
+ac_fn_c_check_decl "$LINENO" "getsubopt" "ac_cv_have_decl_getsubopt" "
+#include <stdlib.h>
+
+"
+if test "x$ac_cv_have_decl_getsubopt" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETSUBOPT $ac_have_decl
+_ACEOF
ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "
#include <stdlib.h>
Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.93 src/tools/compat/configure.ac:1.94
--- src/tools/compat/configure.ac:1.93 Thu Aug 16 08:03:36 2018
+++ src/tools/compat/configure.ac Thu Aug 30 08:05:34 2018
@@ -1,4 +1,4 @@
-# $NetBSD: configure.ac,v 1.93 2018/08/16 12:03:36 christos Exp $
+# $NetBSD: configure.ac,v 1.94 2018/08/30 12:05:34 christos Exp $
#
# Autoconf definition file for libnbcompat.
#
@@ -145,7 +145,7 @@ AC_CHECK_DECLS([asprintf, asnprintf, vas
#include <stdio.h>
])
-AC_CHECK_DECLS([atoll, heapsort, mkdtemp, mkstemp, reallocarr,
+AC_CHECK_DECLS([atoll, heapsort, mkdtemp, mkstemp, reallocarr, getsubopt,
setenv, strtoi, strtoll, strtou, setprogname, getprogname],,, [
#include <stdlib.h>
])
Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.46 src/tools/compat/nbtool_config.h.in:1.47
--- src/tools/compat/nbtool_config.h.in:1.46 Thu Aug 16 08:03:36 2018
+++ src/tools/compat/nbtool_config.h.in Thu Aug 30 08:05:34 2018
@@ -1,6 +1,6 @@
/* nbtool_config.h.in. Generated from configure.ac by autoheader. */
-/* $NetBSD: nbtool_config.h.in,v 1.46 2018/08/16 12:03:36 christos Exp $ */
+/* $NetBSD: nbtool_config.h.in,v 1.47 2018/08/30 12:05:34 christos Exp $ */
#ifndef __NETBSD_NBTOOL_CONFIG_H__
#define __NETBSD_NBTOOL_CONFIG_H__
@@ -154,6 +154,10 @@
don't. */
#undef HAVE_DECL_GETPROGNAME
+/* Define to 1 if you have the declaration of `getsubopt', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETSUBOPT
+
/* Define to 1 if you have the declaration of `gid_from_group', and to 0 if
you don't. */
#undef HAVE_DECL_GID_FROM_GROUP