summaryrefslogtreecommitdiffstats
path: root/libdb
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:16:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:16:24 +0000
commit9221dca64f0c8b5de72727491e41cf63e902eaab (patch)
treed8cbbf520eb4b5c656a54b2e36947008dcb751ad /libdb
parentInitial commit. (diff)
downloadman-db-9221dca64f0c8b5de72727491e41cf63e902eaab.tar.xz
man-db-9221dca64f0c8b5de72727491e41cf63e902eaab.zip
Adding upstream version 2.8.5.upstream/2.8.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libdb')
-rw-r--r--libdb/Makefile.am47
-rw-r--r--libdb/Makefile.in1867
-rw-r--r--libdb/README7
-rw-r--r--libdb/db_btree.c272
-rw-r--r--libdb/db_delete.c148
-rw-r--r--libdb/db_gdbm.c289
-rw-r--r--libdb/db_lookup.c493
-rw-r--r--libdb/db_ndbm.c128
-rw-r--r--libdb/db_storage.h104
-rw-r--r--libdb/db_store.c369
-rw-r--r--libdb/db_ver.c83
-rw-r--r--libdb/mydbm.h189
12 files changed, 3996 insertions, 0 deletions
diff --git a/libdb/Makefile.am b/libdb/Makefile.am
new file mode 100644
index 0000000..0015b84
--- /dev/null
+++ b/libdb/Makefile.am
@@ -0,0 +1,47 @@
+## Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 1994, 1995 Graeme Wilford.
+## Copyright (C) 2001, 2003, 2005, 2006, 2007 Colin Watson.
+##
+## This file is part of man-db.
+##
+## man-db is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## man-db is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with man-db; if not, write to the Free Software Foundation,
+## Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+pkglib_LTLIBRARIES = libmandb.la
+dist_noinst_DATA = README
+
+AM_CFLAGS = $(WARN_CFLAGS)
+
+libmandb_la_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/gl/lib \
+ -I$(top_builddir)/gl/lib \
+ -I$(top_srcdir)/lib
+
+libmandb_la_SOURCES = \
+ db_btree.c \
+ db_delete.c \
+ db_gdbm.c \
+ db_lookup.c \
+ db_ndbm.c \
+ db_storage.h \
+ db_store.c \
+ db_ver.c \
+ mydbm.h
+
+libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS)
+
+libmandb_la_LDFLAGS = \
+ -avoid-version -release $(VERSION) -rpath $(pkglibdir) -no-undefined
diff --git a/libdb/Makefile.in b/libdb/Makefile.in
new file mode 100644
index 0000000..6a43a77
--- /dev/null
+++ b/libdb/Makefile.in
@@ -0,0 +1,1867 @@
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = libdb
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
+ $(top_srcdir)/m4/man-arg-automatic-update.m4 \
+ $(top_srcdir)/m4/man-arg-cache-owner.m4 \
+ $(top_srcdir)/m4/man-arg-cats.m4 \
+ $(top_srcdir)/m4/man-arg-config-file.m4 \
+ $(top_srcdir)/m4/man-arg-db.m4 \
+ $(top_srcdir)/m4/man-arg-device.m4 \
+ $(top_srcdir)/m4/man-arg-mandirs.m4 \
+ $(top_srcdir)/m4/man-arg-override-dir.m4 \
+ $(top_srcdir)/m4/man-arg-sections.m4 \
+ $(top_srcdir)/m4/man-arg-setuid.m4 \
+ $(top_srcdir)/m4/man-arg-systemdsystemunitdir.m4 \
+ $(top_srcdir)/m4/man-arg-systemdtmpfilesdir.m4 \
+ $(top_srcdir)/m4/man-arg-undoc.m4 $(top_srcdir)/m4/man-bdb.m4 \
+ $(top_srcdir)/m4/man-check-progs.m4 \
+ $(top_srcdir)/m4/man-compress-lib.m4 \
+ $(top_srcdir)/m4/man-gnu-nroff.m4 \
+ $(top_srcdir)/m4/man-heirloom-nroff.m4 \
+ $(top_srcdir)/m4/man-libseccomp.m4 \
+ $(top_srcdir)/m4/man-linguas.m4 $(top_srcdir)/m4/man-po4a.m4 \
+ $(top_srcdir)/m4/man-tar-sort-name.m4 \
+ $(top_srcdir)/m4/man-trans-subst.m4 \
+ $(top_srcdir)/gl/m4/00gnulib.m4 \
+ $(top_srcdir)/gl/m4/__inline.m4 \
+ $(top_srcdir)/gl/m4/absolute-header.m4 \
+ $(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/argp.m4 \
+ $(top_srcdir)/gl/m4/asm-underscore.m4 \
+ $(top_srcdir)/gl/m4/btowc.m4 \
+ $(top_srcdir)/gl/m4/builtin-expect.m4 \
+ $(top_srcdir)/gl/m4/canonicalize.m4 \
+ $(top_srcdir)/gl/m4/chdir-long.m4 \
+ $(top_srcdir)/gl/m4/clock_time.m4 $(top_srcdir)/gl/m4/close.m4 \
+ $(top_srcdir)/gl/m4/closedir.m4 $(top_srcdir)/gl/m4/codeset.m4 \
+ $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \
+ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \
+ $(top_srcdir)/gl/m4/dirname.m4 \
+ $(top_srcdir)/gl/m4/double-slash-root.m4 \
+ $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \
+ $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \
+ $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \
+ $(top_srcdir)/gl/m4/exponentd.m4 \
+ $(top_srcdir)/gl/m4/extensions.m4 \
+ $(top_srcdir)/gl/m4/extern-inline.m4 \
+ $(top_srcdir)/gl/m4/fchdir.m4 $(top_srcdir)/gl/m4/fcntl-o.m4 \
+ $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \
+ $(top_srcdir)/gl/m4/fdopendir.m4 \
+ $(top_srcdir)/gl/m4/filenamecat.m4 \
+ $(top_srcdir)/gl/m4/flexmember.m4 \
+ $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/flock.m4 \
+ $(top_srcdir)/gl/m4/fnmatch.m4 \
+ $(top_srcdir)/gl/m4/fnmatch_h.m4 $(top_srcdir)/gl/m4/fstat.m4 \
+ $(top_srcdir)/gl/m4/fstatat.m4 $(top_srcdir)/gl/m4/futimens.m4 \
+ $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \
+ $(top_srcdir)/gl/m4/getcwd-path-max.m4 \
+ $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \
+ $(top_srcdir)/gl/m4/getdtablesize.m4 \
+ $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getlogin.m4 \
+ $(top_srcdir)/gl/m4/getlogin_r.m4 \
+ $(top_srcdir)/gl/m4/getopt.m4 \
+ $(top_srcdir)/gl/m4/getpagesize.m4 \
+ $(top_srcdir)/gl/m4/getprogname.m4 \
+ $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \
+ $(top_srcdir)/gl/m4/gettimeofday.m4 \
+ $(top_srcdir)/gl/m4/glibc21.m4 $(top_srcdir)/gl/m4/glob.m4 \
+ $(top_srcdir)/gl/m4/glob_h.m4 \
+ $(top_srcdir)/gl/m4/gnulib-common.m4 \
+ $(top_srcdir)/gl/m4/gnulib-comp.m4 \
+ $(top_srcdir)/gl/m4/host-cpu-c-abi.m4 \
+ $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idpriv.m4 \
+ $(top_srcdir)/gl/m4/include_next.m4 \
+ $(top_srcdir)/gl/m4/intlmacosx.m4 \
+ $(top_srcdir)/gl/m4/intmax_t.m4 \
+ $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \
+ $(top_srcdir)/gl/m4/langinfo_h.m4 \
+ $(top_srcdir)/gl/m4/largefile.m4 \
+ $(top_srcdir)/gl/m4/lib-ignore.m4 \
+ $(top_srcdir)/gl/m4/lib-ld.m4 $(top_srcdir)/gl/m4/lib-link.m4 \
+ $(top_srcdir)/gl/m4/lib-prefix.m4 \
+ $(top_srcdir)/gl/m4/libtool.m4 $(top_srcdir)/gl/m4/limits-h.m4 \
+ $(top_srcdir)/gl/m4/localcharset.m4 \
+ $(top_srcdir)/gl/m4/locale-fr.m4 \
+ $(top_srcdir)/gl/m4/locale-ja.m4 \
+ $(top_srcdir)/gl/m4/locale-zh.m4 \
+ $(top_srcdir)/gl/m4/locale_h.m4 \
+ $(top_srcdir)/gl/m4/localeconv.m4 \
+ $(top_srcdir)/gl/m4/localtime-buffer.m4 \
+ $(top_srcdir)/gl/m4/lock.m4 $(top_srcdir)/gl/m4/longlong.m4 \
+ $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/ltoptions.m4 \
+ $(top_srcdir)/gl/m4/ltsugar.m4 \
+ $(top_srcdir)/gl/m4/ltversion.m4 \
+ $(top_srcdir)/gl/m4/lt~obsolete.m4 \
+ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/malloca.m4 \
+ $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
+ $(top_srcdir)/gl/m4/mbsrtowcs.m4 \
+ $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
+ $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/memmem.m4 \
+ $(top_srcdir)/gl/m4/mempcpy.m4 $(top_srcdir)/gl/m4/memrchr.m4 \
+ $(top_srcdir)/gl/m4/minmax.m4 $(top_srcdir)/gl/m4/mkdir.m4 \
+ $(top_srcdir)/gl/m4/mkdtemp.m4 $(top_srcdir)/gl/m4/mkstemp.m4 \
+ $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \
+ $(top_srcdir)/gl/m4/msvc-inval.m4 \
+ $(top_srcdir)/gl/m4/msvc-nothrow.m4 \
+ $(top_srcdir)/gl/m4/multiarch.m4 \
+ $(top_srcdir)/gl/m4/nanosleep.m4 \
+ $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \
+ $(top_srcdir)/gl/m4/nocrash.m4 \
+ $(top_srcdir)/gl/m4/nonblocking.m4 \
+ $(top_srcdir)/gl/m4/off_t.m4 \
+ $(top_srcdir)/gl/m4/open-cloexec.m4 \
+ $(top_srcdir)/gl/m4/open.m4 $(top_srcdir)/gl/m4/openat.m4 \
+ $(top_srcdir)/gl/m4/opendir.m4 $(top_srcdir)/gl/m4/pathmax.m4 \
+ $(top_srcdir)/gl/m4/po.m4 $(top_srcdir)/gl/m4/printf.m4 \
+ $(top_srcdir)/gl/m4/progtest.m4 \
+ $(top_srcdir)/gl/m4/pthread_rwlock_rdlock.m4 \
+ $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/rawmemchr.m4 \
+ $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \
+ $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \
+ $(top_srcdir)/gl/m4/rename.m4 $(top_srcdir)/gl/m4/rewinddir.m4 \
+ $(top_srcdir)/gl/m4/rmdir.m4 $(top_srcdir)/gl/m4/same.m4 \
+ $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/select.m4 \
+ $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/sigaction.m4 \
+ $(top_srcdir)/gl/m4/signal_h.m4 \
+ $(top_srcdir)/gl/m4/signalblocking.m4 \
+ $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \
+ $(top_srcdir)/gl/m4/socketlib.m4 \
+ $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \
+ $(top_srcdir)/gl/m4/ssize_t.m4 \
+ $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \
+ $(top_srcdir)/gl/m4/std-gnu11.m4 \
+ $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \
+ $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
+ $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \
+ $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
+ $(top_srcdir)/gl/m4/strcase.m4 \
+ $(top_srcdir)/gl/m4/strcasestr.m4 \
+ $(top_srcdir)/gl/m4/strchrnul.m4 $(top_srcdir)/gl/m4/strdup.m4 \
+ $(top_srcdir)/gl/m4/strerror.m4 \
+ $(top_srcdir)/gl/m4/string_h.m4 \
+ $(top_srcdir)/gl/m4/strings_h.m4 \
+ $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \
+ $(top_srcdir)/gl/m4/strsep.m4 \
+ $(top_srcdir)/gl/m4/sys_file_h.m4 \
+ $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \
+ $(top_srcdir)/gl/m4/sys_select_h.m4 \
+ $(top_srcdir)/gl/m4/sys_socket_h.m4 \
+ $(top_srcdir)/gl/m4/sys_stat_h.m4 \
+ $(top_srcdir)/gl/m4/sys_time_h.m4 \
+ $(top_srcdir)/gl/m4/sys_types_h.m4 \
+ $(top_srcdir)/gl/m4/sys_uio_h.m4 \
+ $(top_srcdir)/gl/m4/sysexits.m4 \
+ $(top_srcdir)/gl/m4/tempname.m4 \
+ $(top_srcdir)/gl/m4/threadlib.m4 $(top_srcdir)/gl/m4/time_h.m4 \
+ $(top_srcdir)/gl/m4/timespec.m4 \
+ $(top_srcdir)/gl/m4/unistd-safer.m4 \
+ $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/utime.m4 \
+ $(top_srcdir)/gl/m4/utime_h.m4 $(top_srcdir)/gl/m4/utimens.m4 \
+ $(top_srcdir)/gl/m4/utimes.m4 \
+ $(top_srcdir)/gl/m4/vasnprintf.m4 \
+ $(top_srcdir)/gl/m4/vasprintf.m4 \
+ $(top_srcdir)/gl/m4/vsnprintf.m4 \
+ $(top_srcdir)/gl/m4/warn-on-use.m4 \
+ $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \
+ $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \
+ $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wint_t.m4 \
+ $(top_srcdir)/gl/m4/xalloc.m4 $(top_srcdir)/gl/m4/xgetcwd.m4 \
+ $(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \
+ $(top_srcdir)/gl/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_noinst_DATA) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libmandb_la_DEPENDENCIES = ../lib/libman.la $(am__DEPENDENCIES_1)
+am_libmandb_la_OBJECTS = libmandb_la-db_btree.lo \
+ libmandb_la-db_delete.lo libmandb_la-db_gdbm.lo \
+ libmandb_la-db_lookup.lo libmandb_la-db_ndbm.lo \
+ libmandb_la-db_store.lo libmandb_la-db_ver.lo
+libmandb_la_OBJECTS = $(am_libmandb_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libmandb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libmandb_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/libmandb_la-db_btree.Plo \
+ ./$(DEPDIR)/libmandb_la-db_delete.Plo \
+ ./$(DEPDIR)/libmandb_la-db_gdbm.Plo \
+ ./$(DEPDIR)/libmandb_la-db_lookup.Plo \
+ ./$(DEPDIR)/libmandb_la-db_ndbm.Plo \
+ ./$(DEPDIR)/libmandb_la-db_store.Plo \
+ ./$(DEPDIR)/libmandb_la-db_ver.Plo
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libmandb_la_SOURCES)
+DIST_SOURCES = $(libmandb_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(dist_noinst_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/build-aux/depcomp README
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBLIBS = @DBLIBS@
+DBTYPE = @DBTYPE@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GLOB_H = @GLOB_H@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACCEPT = @GNULIB_ACCEPT@
+GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BIND = @GNULIB_BIND@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_CONNECT = @GNULIB_CONNECT@
+GNULIB_CTIME = @GNULIB_CTIME@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFS = @GNULIB_FFS@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
+GNULIB_FLOCK = @GNULIB_FLOCK@
+GNULIB_FNMATCH = @GNULIB_FNMATCH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSCANF = @GNULIB_FSCANF@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETPASS = @GNULIB_GETPASS@
+GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
+GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
+GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GLOB = @GNULIB_GLOB@
+GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_IOCTL = @GNULIB_IOCTL@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LISTEN = @GNULIB_LISTEN@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PSELECT = @GNULIB_PSELECT@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_RECV = @GNULIB_RECV@
+GNULIB_RECVFROM = @GNULIB_RECVFROM@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
+GNULIB_SELECT = @GNULIB_SELECT@
+GNULIB_SEND = @GNULIB_SEND@
+GNULIB_SENDTO = @GNULIB_SENDTO@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
+GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SOCKET = @GNULIB_SOCKET@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
+GNULIB_STRFTIME = @GNULIB_STRFTIME@
+GNULIB_STRNCAT = @GNULIB_STRNCAT@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRPTIME = @GNULIB_STRPTIME@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
+GNULIB_TMPFILE = @GNULIB_TMPFILE@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_TZSET = @GNULIB_TZSET@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIME = @GNULIB_UTIME@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
+GNULIB_WRITE = @GNULIB_WRITE@
+GNULIB__EXIT = @GNULIB__EXIT@
+GREP = @GREP@
+HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
+HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
+HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
+HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFS = @HAVE_FFS@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FLOCK = @HAVE_FLOCK@
+HAVE_FNMATCH = @HAVE_FNMATCH@
+HAVE_FNMATCH_H = @HAVE_FNMATCH_H@
+HAVE_FREELOCALE = @HAVE_FREELOCALE@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GLOB = @HAVE_GLOB@
+HAVE_GLOB_H = @HAVE_GLOB_H@
+HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_ALTMON = @HAVE_LANGINFO_ALTMON@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
+HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMP = @HAVE_MKSTEMP@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
+HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRINGS_H = @HAVE_STRINGS_H@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRPTIME = @HAVE_STRPTIME@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
+HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
+HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
+HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_TZSET = @HAVE_TZSET@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIME = @HAVE_UTIME@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
+HAVE_UTIME_H = @HAVE_UTIME_H@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSFTIME = @HAVE_WCSFTIME@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+IGNORE_UNUSED_LIBRARIES_CFLAGS = @IGNORE_UNUSED_LIBRARIES_CFLAGS@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBCOMPRESS = @LIBCOMPRESS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
+LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
+LIBS = @LIBS@
+LIBSOCKET = @LIBSOCKET@
+LIBTHREAD = @LIBTHREAD@
+LIBTOOL = @LIBTOOL@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETLOGIN = @LIB_GETLOGIN@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_SELECT = @LIB_SELECT@
+LIMITS_H = @LIMITS_H@
+LINGUAS = @LINGUAS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
+LTALLOCA = @LTALLOCA@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
+LTLIBOBJS = @LTLIBOBJS@
+LTLIBPTH = @LTLIBPTH@
+LTLIBTHREAD = @LTLIBTHREAD@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANDIR_LAYOUT = @MANDIR_LAYOUT@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MAN_SUBDIRS = @MAN_SUBDIRS@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_GLOB_H = @NEXT_AS_FIRST_DIRECTIVE_GLOB_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_UTIME_H = @NEXT_AS_FIRST_DIRECTIVE_UTIME_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_DIRENT_H = @NEXT_DIRENT_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_GLOB_H = @NEXT_GLOB_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
+NEXT_STDARG_H = @NEXT_STDARG_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@
+NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
+NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
+NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
+NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_UTIME_H = @NEXT_UTIME_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PO4A = @PO4A@
+POSUB = @POSUB@
+PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_CTIME = @REPLACE_CTIME@
+REPLACE_DIRFD = @REPLACE_DIRFD@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FNMATCH = @REPLACE_FNMATCH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GLOB = @REPLACE_GLOB@
+REPLACE_GLOB_PATTERN_P = @REPLACE_GLOB_PATTERN_P@
+REPLACE_GMTIME = @REPLACE_GMTIME@
+REPLACE_IOCTL = @REPLACE_IOCTL@
+REPLACE_ISATTY = @REPLACE_ISATTY@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SELECT = @REPLACE_SELECT@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
+REPLACE_STRFTIME = @REPLACE_STRFTIME@
+REPLACE_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_TZSET = @REPLACE_TZSET@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIME = @REPLACE_UTIME@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYSEXITS_H = @SYSEXITS_H@
+SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
+SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TBL_X_FORMAT = @TBL_X_FORMAT@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TRANS_APROPOS = @TRANS_APROPOS@
+TRANS_APROPOS_UPPER = @TRANS_APROPOS_UPPER@
+TRANS_CATMAN = @TRANS_CATMAN@
+TRANS_CATMAN_UPPER = @TRANS_CATMAN_UPPER@
+TRANS_LEXGROG = @TRANS_LEXGROG@
+TRANS_LEXGROG_UPPER = @TRANS_LEXGROG_UPPER@
+TRANS_MAN = @TRANS_MAN@
+TRANS_MANCONV = @TRANS_MANCONV@
+TRANS_MANCONV_UPPER = @TRANS_MANCONV_UPPER@
+TRANS_MANDB = @TRANS_MANDB@
+TRANS_MANDB_UPPER = @TRANS_MANDB_UPPER@
+TRANS_MANPATH = @TRANS_MANPATH@
+TRANS_MANPATH_UPPER = @TRANS_MANPATH_UPPER@
+TRANS_MAN_UPPER = @TRANS_MAN_UPPER@
+TRANS_WHATIS = @TRANS_WHATIS@
+TRANS_WHATIS_UPPER = @TRANS_WHATIS_UPPER@
+TRANS_ZSOELIM = @TRANS_ZSOELIM@
+TRANS_ZSOELIM_UPPER = @TRANS_ZSOELIM_UPPER@
+TROFF = @TROFF@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_NLS = @USE_NLS@
+UTIME_H = @UTIME_H@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
+WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@
+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+browser = @browser@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+bunzip2 = @bunzip2@
+bzip2 = @bzip2@
+cache_top_owner = @cache_top_owner@
+cat = @cat@
+col = @col@
+compress = @compress@
+compress_ext = @compress_ext@
+compressor = @compressor@
+config_file = @config_file@
+config_file_basename = @config_file_basename@
+config_file_dirname = @config_file_dirname@
+datadir = @datadir@
+datarootdir = @datarootdir@
+date = @date@
+docdir = @docdir@
+dvidir = @dvidir@
+eqn = @eqn@
+exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
+gltests_WITNESS = @gltests_WITNESS@
+grap = @grap@
+grep = @grep@
+gunzip = @gunzip@
+gzip = @gzip@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libpipeline_CFLAGS = @libpipeline_CFLAGS@
+libpipeline_LIBS = @libpipeline_LIBS@
+libseccomp_CFLAGS = @libseccomp_CFLAGS@
+libseccomp_LIBS = @libseccomp_LIBS@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lzip = @lzip@
+lzma = @lzma@
+man_mode = @man_mode@
+man_owner = @man_owner@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+neqn = @neqn@
+nroff = @nroff@
+oldincludedir = @oldincludedir@
+override_dir = @override_dir@
+pager = @pager@
+pdfdir = @pdfdir@
+pic = @pic@
+preconv = @preconv@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+refer = @refer@
+roff_version = @roff_version@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sections = @sections@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+systemdtmpfilesdir = @systemdtmpfilesdir@
+target_alias = @target_alias@
+tbl = @tbl@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+tr = @tr@
+troff = @troff@
+uncompress = @uncompress@
+unlzip = @unlzip@
+unlzma = @unlzma@
+unxz = @unxz@
+vgrind = @vgrind@
+xz = @xz@
+pkglib_LTLIBRARIES = libmandb.la
+dist_noinst_DATA = README
+AM_CFLAGS = $(WARN_CFLAGS)
+libmandb_la_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/gl/lib \
+ -I$(top_builddir)/gl/lib \
+ -I$(top_srcdir)/lib
+
+libmandb_la_SOURCES = \
+ db_btree.c \
+ db_delete.c \
+ db_gdbm.c \
+ db_lookup.c \
+ db_ndbm.c \
+ db_storage.h \
+ db_store.c \
+ db_ver.c \
+ mydbm.h
+
+libmandb_la_LIBADD = ../lib/libman.la $(DBLIBS)
+libmandb_la_LDFLAGS = \
+ -avoid-version -release $(VERSION) -rpath $(pkglibdir) -no-undefined
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libdb/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign libdb/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+ }
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libmandb.la: $(libmandb_la_OBJECTS) $(libmandb_la_DEPENDENCIES) $(EXTRA_libmandb_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libmandb_la_LINK) -rpath $(pkglibdir) $(libmandb_la_OBJECTS) $(libmandb_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmandb_la-db_btree.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmandb_la-db_delete.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmandb_la-db_gdbm.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmandb_la-db_lookup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmandb_la-db_ndbm.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmandb_la-db_store.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmandb_la-db_ver.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libmandb_la-db_btree.lo: db_btree.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmandb_la-db_btree.lo -MD -MP -MF $(DEPDIR)/libmandb_la-db_btree.Tpo -c -o libmandb_la-db_btree.lo `test -f 'db_btree.c' || echo '$(srcdir)/'`db_btree.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmandb_la-db_btree.Tpo $(DEPDIR)/libmandb_la-db_btree.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db_btree.c' object='libmandb_la-db_btree.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmandb_la-db_btree.lo `test -f 'db_btree.c' || echo '$(srcdir)/'`db_btree.c
+
+libmandb_la-db_delete.lo: db_delete.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmandb_la-db_delete.lo -MD -MP -MF $(DEPDIR)/libmandb_la-db_delete.Tpo -c -o libmandb_la-db_delete.lo `test -f 'db_delete.c' || echo '$(srcdir)/'`db_delete.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmandb_la-db_delete.Tpo $(DEPDIR)/libmandb_la-db_delete.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db_delete.c' object='libmandb_la-db_delete.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmandb_la-db_delete.lo `test -f 'db_delete.c' || echo '$(srcdir)/'`db_delete.c
+
+libmandb_la-db_gdbm.lo: db_gdbm.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmandb_la-db_gdbm.lo -MD -MP -MF $(DEPDIR)/libmandb_la-db_gdbm.Tpo -c -o libmandb_la-db_gdbm.lo `test -f 'db_gdbm.c' || echo '$(srcdir)/'`db_gdbm.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmandb_la-db_gdbm.Tpo $(DEPDIR)/libmandb_la-db_gdbm.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db_gdbm.c' object='libmandb_la-db_gdbm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmandb_la-db_gdbm.lo `test -f 'db_gdbm.c' || echo '$(srcdir)/'`db_gdbm.c
+
+libmandb_la-db_lookup.lo: db_lookup.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmandb_la-db_lookup.lo -MD -MP -MF $(DEPDIR)/libmandb_la-db_lookup.Tpo -c -o libmandb_la-db_lookup.lo `test -f 'db_lookup.c' || echo '$(srcdir)/'`db_lookup.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmandb_la-db_lookup.Tpo $(DEPDIR)/libmandb_la-db_lookup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db_lookup.c' object='libmandb_la-db_lookup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmandb_la-db_lookup.lo `test -f 'db_lookup.c' || echo '$(srcdir)/'`db_lookup.c
+
+libmandb_la-db_ndbm.lo: db_ndbm.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmandb_la-db_ndbm.lo -MD -MP -MF $(DEPDIR)/libmandb_la-db_ndbm.Tpo -c -o libmandb_la-db_ndbm.lo `test -f 'db_ndbm.c' || echo '$(srcdir)/'`db_ndbm.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmandb_la-db_ndbm.Tpo $(DEPDIR)/libmandb_la-db_ndbm.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db_ndbm.c' object='libmandb_la-db_ndbm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmandb_la-db_ndbm.lo `test -f 'db_ndbm.c' || echo '$(srcdir)/'`db_ndbm.c
+
+libmandb_la-db_store.lo: db_store.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmandb_la-db_store.lo -MD -MP -MF $(DEPDIR)/libmandb_la-db_store.Tpo -c -o libmandb_la-db_store.lo `test -f 'db_store.c' || echo '$(srcdir)/'`db_store.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmandb_la-db_store.Tpo $(DEPDIR)/libmandb_la-db_store.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db_store.c' object='libmandb_la-db_store.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmandb_la-db_store.lo `test -f 'db_store.c' || echo '$(srcdir)/'`db_store.c
+
+libmandb_la-db_ver.lo: db_ver.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmandb_la-db_ver.lo -MD -MP -MF $(DEPDIR)/libmandb_la-db_ver.Tpo -c -o libmandb_la-db_ver.lo `test -f 'db_ver.c' || echo '$(srcdir)/'`db_ver.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmandb_la-db_ver.Tpo $(DEPDIR)/libmandb_la-db_ver.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db_ver.c' object='libmandb_la-db_ver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmandb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmandb_la-db_ver.lo `test -f 'db_ver.c' || echo '$(srcdir)/'`db_ver.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/libmandb_la-db_btree.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_delete.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_gdbm.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_lookup.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_ndbm.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_store.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_ver.Plo
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/libmandb_la-db_btree.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_delete.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_gdbm.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_lookup.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_ndbm.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_store.Plo
+ -rm -f ./$(DEPDIR)/libmandb_la-db_ver.Plo
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libtool clean-pkglibLTLIBRARIES \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-pkglibLTLIBRARIES install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-pkglibLTLIBRARIES
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libdb/README b/libdb/README
new file mode 100644
index 0000000..c1816bd
--- /dev/null
+++ b/libdb/README
@@ -0,0 +1,7 @@
+This directory contains the database management routines required by the
+man-db package.
+
+* You may distribute under the terms of the GNU Library General Public
+* License as specified in the file COPYING.LIB that comes with the man
+* distribution.
+
diff --git a/libdb/db_btree.c b/libdb/db_btree.c
new file mode 100644
index 0000000..4469bf6
--- /dev/null
+++ b/libdb/db_btree.c
@@ -0,0 +1,272 @@
+/*
+ * db_btree.c: low level btree interface routines for man.
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ * Copyright (C) 2002 Colin Watson.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+/* below this line are routines only useful for the BTREE interface */
+#ifdef BTREE
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#include <sys/file.h> /* for flock() */
+#include <sys/types.h> /* for open() */
+#include <sys/stat.h>
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#include <unistd.h>
+
+#include "stat-time.h"
+#include "timespec.h"
+
+#include "manconfig.h"
+
+#include "error.h"
+#include "hashtable.h"
+
+#include "mydbm.h"
+#include "db_storage.h"
+
+struct hashtable *loop_check_hash;
+
+/* the Berkeley database libraries do nothing to arbitrate between concurrent
+ database accesses, so we do a simple flock(). If the db is opened in
+ anything but O_RDONLY mode, an exclusive lock is enabled. Otherwise, the
+ lock is shared. A file cannot have both locks at once, and the non
+ blocking method is used ": Try again". This adopts GNU dbm's approach. */
+
+/* release the lock and close the database */
+int btree_close (DB *db)
+{
+ (void) flock ((db->fd) (db), LOCK_UN);
+ return (db->close) (db);
+}
+
+/* open a btree type database, with file locking. */
+DB *btree_flopen (char *filename, int flags, int mode)
+{
+ DB *db;
+ BTREEINFO b;
+ int lock_op;
+ int lock_failed;
+
+ b.flags = 0; /* do not allow any duplicate keys */
+
+ b.cachesize = 0; /* default size */
+ b.maxkeypage = 0; /* default */
+ b.minkeypage = 0; /* default */
+ b.psize = 0; /* default page size (2048?) */
+ b.compare = NULL; /* builtin compare() function */
+ b.prefix = NULL; /* builtin function */
+ b.lorder = 0; /* byte order of host */
+
+ if (flags & ~O_RDONLY) {
+ /* flags includes O_RDWR or O_WRONLY, need an exclusive lock */
+ lock_op = LOCK_EX | LOCK_NB;
+ } else {
+ lock_op = LOCK_SH | LOCK_NB;
+ }
+
+ if (!(flags & O_CREAT)) {
+ /* Berkeley DB thinks that a zero-length file means that
+ * somebody else is writing it, and sleeps for a few
+ * seconds to give the writer a chance. All very well, but
+ * the common case is that the database is just zero-length
+ * because mandb was interrupted or ran out of disk space or
+ * something like that - so we check for this case by hand
+ * and ignore the database if it's zero-length.
+ */
+ struct stat iszero;
+ if (stat (filename, &iszero) < 0)
+ return NULL;
+ if (iszero.st_size == 0) {
+ errno = EINVAL;
+ return NULL;
+ }
+ }
+
+ if (flags & O_TRUNC) {
+ /* opening the db is destructive, need to lock first */
+ int fd;
+
+ db = NULL;
+ lock_failed = 1;
+ fd = open (filename, flags & ~O_TRUNC, mode);
+ if (fd != -1) {
+ if (!(lock_failed = flock (fd, lock_op)))
+ db = dbopen (filename, flags, mode,
+ DB_BTREE, &b);
+ close (fd);
+ }
+ } else {
+ db = dbopen (filename, flags, mode, DB_BTREE, &b);
+ if (db)
+ lock_failed = flock ((db->fd) (db), lock_op);
+ }
+
+ if (!db)
+ return NULL;
+
+ if (lock_failed) {
+ gripe_lock (filename);
+ btree_close (db);
+ return NULL;
+ }
+
+ return db;
+}
+
+/* do a replace when we have the duplicate flag set on the database -
+ we must do a del and insert, as a direct insert will not wipe out the
+ old entry */
+int btree_replace (DB *db, datum key, datum cont)
+{
+ return (db->put) (db, (DBT *) &key, (DBT *) &cont, 0);
+}
+
+int btree_insert (DB *db, datum key, datum cont)
+{
+ return (db->put) (db, (DBT *) &key, (DBT *) &cont, R_NOOVERWRITE);
+}
+
+/* generic fetch routine for the btree database */
+datum btree_fetch (DB *db, datum key)
+{
+ datum data;
+
+ memset (&data, 0, sizeof data);
+
+ if ((db->get) (db, (DBT *) &key, (DBT *) &data, 0)) {
+ memset (&data, 0, sizeof data);
+ return data;
+ }
+
+ return copy_datum (data);
+}
+
+/* return 1 if the key exists, 0 otherwise */
+int btree_exists (DB *db, datum key)
+{
+ datum data;
+ return ((db->get) (db, (DBT *) &key, (DBT *) &data, 0) ? 0 : 1);
+}
+
+/* initiate a sequential access */
+static datum btree_findkey (DB *db, u_int flags)
+{
+ datum key, data;
+
+ memset (&key, 0, sizeof key);
+ memset (&data, 0, sizeof data);
+
+ if (flags == R_FIRST) {
+ if (loop_check_hash) {
+ hashtable_free (loop_check_hash);
+ loop_check_hash = NULL;
+ }
+ }
+ if (!loop_check_hash)
+ loop_check_hash = hashtable_create (&free);
+
+ if (((db->seq) (db, (DBT *) &key, (DBT *) &data, flags))) {
+ memset (&key, 0, sizeof key);
+ return key;
+ }
+
+ if (hashtable_lookup (loop_check_hash,
+ MYDBM_DPTR (key), MYDBM_DSIZE (key))) {
+ /* We've seen this key already, which is broken. Return NULL
+ * so the caller doesn't go round in circles.
+ */
+ debug ("Corrupt database! Already seen %*s. "
+ "Attempting to recover ...\n",
+ (int) MYDBM_DSIZE (key), MYDBM_DPTR (key));
+ memset (&key, 0, sizeof key);
+ return key;
+ }
+
+ hashtable_install (loop_check_hash,
+ MYDBM_DPTR (key), MYDBM_DSIZE (key), NULL);
+
+ return copy_datum (key);
+}
+
+/* return the first key in the db */
+datum btree_firstkey (DB *db)
+{
+ return btree_findkey (db, R_FIRST);
+}
+
+/* return the next key in the db. NB. This routine only works if the cursor
+ has been previously set by btree_firstkey() since it was last opened. So
+ if we close/reopen a db mid search, we have to manually set up the
+ cursor again. */
+datum btree_nextkey (DB *db)
+{
+ return btree_findkey (db, R_NEXT);
+}
+
+/* compound nextkey routine, initialising key and content */
+int btree_nextkeydata (DB *db, datum *key, datum *cont)
+{
+ int status;
+
+ if ((status = (db->seq) (db, (DBT *) key, (DBT *) cont, R_NEXT)) != 0)
+ return status;
+
+ *key = copy_datum (*key);
+ *cont = copy_datum (*cont);
+
+ return 0;
+}
+
+struct timespec btree_get_time (DB *db)
+{
+ struct stat st;
+
+ if (fstat ((db->fd) (db), &st) < 0) {
+ struct timespec t;
+ t.tv_sec = -1;
+ t.tv_nsec = -1;
+ return t;
+ }
+ return get_stat_mtime (&st);
+}
+
+void btree_set_time (DB *db, const struct timespec time)
+{
+ struct timespec times[2];
+
+ times[0] = time;
+ times[1] = time;
+ futimens ((db->fd) (db), times);
+}
+
+#endif /* BTREE */
diff --git a/libdb/db_delete.c b/libdb/db_delete.c
new file mode 100644
index 0000000..4ac6401
--- /dev/null
+++ b/libdb/db_delete.c
@@ -0,0 +1,148 @@
+/*
+ * db_delete.c: dbdelete(), database delete routine.
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ * Copyright (C) 2001, 2002 Colin Watson.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "gettext.h"
+#define _(String) gettext (String)
+
+#include "manconfig.h"
+
+#include "error.h"
+
+#include "mydbm.h"
+#include "db_storage.h"
+
+/* Delete an entry for a page.
+ Again, 3 possibilities:
+
+ 1) page is singular reference, just delete it :)
+ 2) page has 2+ companions. Delete page and alter multi entry to not
+ point to it anymore.
+ 3) page has 1 companion. Could do as (2), but we'd waste an entry in
+ the db. Should delete page, extract friend and reinsert as singular,
+ overwriting the old multi entry.
+*/
+
+#define NO_ENTRY 1;
+
+int dbdelete (MYDBM_FILE dbf, const char *name, struct mandata *info)
+{
+ datum key, cont;
+
+ memset (&key, 0, sizeof key);
+ memset (&cont, 0, sizeof cont);
+
+ /* get entry for info */
+
+ debug ("Attempting delete of %s(%s) entry.\n", name, info->ext);
+
+ MYDBM_SET (key, name_to_key (name));
+ cont = MYDBM_FETCH (dbf, key);
+
+ if (!MYDBM_DPTR (cont)) { /* 0 entries */
+ MYDBM_FREE_DPTR (key);
+ return NO_ENTRY;
+ } else if (*MYDBM_DPTR (cont) != '\t') { /* 1 entry */
+ MYDBM_DELETE (dbf, key);
+ MYDBM_FREE_DPTR (cont);
+ } else { /* 2+ entries */
+ char **names, **ext;
+ char *multi_content = NULL;
+ datum multi_key;
+ int refs, i, j;
+
+ /* Extract all of the extensions associated with
+ this key */
+
+ refs = list_extensions (MYDBM_DPTR (cont) + 1, &names, &ext);
+
+ for (i = 0; i < refs; ++i)
+ if (STREQ (names[i], name) &&
+ STREQ (ext[i], info->ext))
+ break;
+
+ if (i >= refs) {
+ free (names);
+ free (ext);
+ MYDBM_FREE_DPTR (cont);
+ MYDBM_FREE_DPTR (key);
+ return NO_ENTRY;
+ }
+
+ multi_key = make_multi_key (names[i], ext[i]);
+ if (!MYDBM_EXISTS (dbf, multi_key)) {
+ error (0, 0,
+ _( "multi key %s does not exist"),
+ MYDBM_DPTR (multi_key));
+ gripe_corrupt_data ();
+ }
+ MYDBM_DELETE (dbf, multi_key);
+ MYDBM_FREE_DPTR (multi_key);
+
+ /* refs *may* be 1 if all manual pages with this name
+ have been deleted. In this case, we'll have to remove
+ the key too */
+
+ if (refs == 1) {
+ free (names);
+ free (ext);
+ MYDBM_FREE_DPTR (cont);
+ MYDBM_DELETE (dbf, key);
+ MYDBM_FREE_DPTR (key);
+ return 0;
+ }
+
+ /* create our new multi content */
+ for (j = 0; j < refs; ++j)
+ if (i != j)
+ multi_content = appendstr (multi_content,
+ "\t", names[j],
+ "\t", ext[j],
+ (void *) 0);
+
+ MYDBM_FREE_DPTR (cont);
+
+ /* if refs = 2 do something else. Doesn't really matter as
+ the gdbm db file does not shrink any after a deletion
+ anyway */
+
+ MYDBM_SET (cont, multi_content);
+
+ if (MYDBM_REPLACE (dbf, key, cont))
+ gripe_replace_key (MYDBM_DPTR (key));
+
+ free (names);
+ free (ext);
+ }
+
+ MYDBM_FREE_DPTR (key);
+ return 0;
+}
diff --git a/libdb/db_gdbm.c b/libdb/db_gdbm.c
new file mode 100644
index 0000000..f3aaa94
--- /dev/null
+++ b/libdb/db_gdbm.c
@@ -0,0 +1,289 @@
+/*
+ * db_gdbm.c: low level gdbm interface routines for man.
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#ifdef GDBM
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <setjmp.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "stat-time.h"
+#include "timespec.h"
+
+#include "manconfig.h"
+
+#include "hashtable.h"
+#include "cleanup.h"
+
+#include "mydbm.h"
+
+static struct hashtable *parent_sortkey_hash;
+
+struct sortkey {
+ datum key;
+ struct sortkey *next;
+};
+
+/* setjmp/longjmp handling to defend against _gdbm_fatal exiting under our
+ * feet. Not thread-safe, but there is no plan for man-db to ever use
+ * threads.
+ */
+static jmp_buf open_env;
+static int opening;
+
+/* Mimic _gdbm_fatal's error output, but handle errors during open more
+ * gracefully than exiting.
+ */
+static void trap_error (const char *val)
+{
+ if (opening) {
+ debug ("gdbm error: %s\n", val);
+ longjmp (open_env, 1);
+ } else
+ fprintf (stderr, "gdbm fatal: %s\n", val);
+}
+
+man_gdbm_wrapper man_gdbm_open_wrapper (const char *name, int flags)
+{
+ man_gdbm_wrapper wrap;
+ GDBM_FILE file;
+ datum key, content;
+
+ opening = 1;
+ if (setjmp (open_env))
+ return NULL;
+ file = gdbm_open ((char *) name, BLK_SIZE, flags, DBMODE, trap_error);
+ if (!file)
+ return NULL;
+
+ wrap = xmalloc (sizeof *wrap);
+ wrap->name = xstrdup (name);
+ wrap->file = file;
+
+ if ((flags & ~GDBM_FAST) != GDBM_NEWDB) {
+ /* While the setjmp/longjmp guard is in effect, make sure we
+ * can read from the database at all.
+ */
+ memset (&key, 0, sizeof key);
+ MYDBM_SET (key, xstrdup (VER_KEY));
+ content = MYDBM_FETCH (wrap, key);
+ MYDBM_FREE_DPTR (key);
+ MYDBM_FREE_DPTR (content);
+ }
+
+ opening = 0;
+
+ return wrap;
+}
+
+static void parent_sortkey_hashtable_free (void *defn)
+{
+ /* Automatically free child hashtables on removal. */
+ hashtable_free ((struct hashtable *) defn);
+}
+
+static void sortkey_hashtable_free (void *defn)
+{
+ struct sortkey *key = (struct sortkey *) defn;
+ MYDBM_FREE_DPTR (key->key);
+ free (key);
+}
+
+static int sortkey_compare (const void *a, const void *b)
+{
+ const struct sortkey **left = (const struct sortkey **) a;
+ const struct sortkey **right = (const struct sortkey **) b;
+ int cmp;
+ size_t minsize;
+
+ /* Sentinel NULL elements sort to the end. */
+ if (!MYDBM_DPTR ((*left)->key))
+ return 1;
+ else if (!MYDBM_DPTR ((*right)->key))
+ return -1;
+
+ if (MYDBM_DSIZE ((*left)->key) < MYDBM_DSIZE ((*right)->key))
+ minsize = MYDBM_DSIZE ((*left)->key);
+ else
+ minsize = MYDBM_DSIZE ((*right)->key);
+ cmp = strncmp (MYDBM_DPTR ((*left)->key), MYDBM_DPTR ((*right)->key),
+ minsize);
+ if (cmp)
+ return cmp;
+ else if (MYDBM_DSIZE ((*left)->key) < MYDBM_DSIZE ((*right)->key))
+ return 1;
+ else if (MYDBM_DSIZE ((*left)->key) > MYDBM_DSIZE ((*right)->key))
+ return -1;
+ else
+ return 0;
+}
+
+static datum empty_datum = { NULL, 0 };
+
+/* We keep a hashtable of filenames to sorted lists of keys. Each list is
+ * stored both with links from each element to the next and in a hashtable,
+ * so that both sequential access and random access are quick. This is
+ * necessary for a reasonable ordered implementation of nextkey.
+ */
+datum man_gdbm_firstkey (man_gdbm_wrapper wrap)
+{
+ struct hashtable *sortkey_hash;
+ struct sortkey **keys, *firstkey;
+ int numkeys = 0, maxkeys = 256;
+ int i;
+
+ /* Build the raw list of keys and sort it. */
+ keys = xnmalloc (maxkeys, sizeof *keys);
+ keys[0] = xmalloc (sizeof **keys);
+ keys[0]->key = gdbm_firstkey (wrap->file);
+ while (MYDBM_DPTR (keys[numkeys]->key)) {
+ if (++numkeys >= maxkeys) {
+ maxkeys *= 2;
+ keys = xnrealloc (keys, maxkeys, sizeof *keys);
+ }
+ keys[numkeys] = xmalloc (sizeof **keys);
+ keys[numkeys]->key =
+ gdbm_nextkey (wrap->file, keys[numkeys - 1]->key);
+ }
+ free (keys[numkeys]);
+ keys[numkeys] = NULL; /* simplifies the empty case */
+ qsort (keys, numkeys, sizeof *keys, &sortkey_compare);
+
+ /* Link the elements together and insert them into a hash. */
+ sortkey_hash = hashtable_create (&sortkey_hashtable_free);
+ for (i = 0; i < numkeys; ++i) {
+ if (i < numkeys - 1)
+ keys[i]->next = keys[i + 1];
+ else
+ keys[i]->next = NULL;
+ hashtable_install (sortkey_hash,
+ MYDBM_DPTR (keys[i]->key),
+ MYDBM_DSIZE (keys[i]->key),
+ keys[i]);
+ }
+ firstkey = keys[0];
+ free (keys); /* element memory now owned by hashtable */
+
+ if (!parent_sortkey_hash) {
+ parent_sortkey_hash = hashtable_create
+ (&parent_sortkey_hashtable_free);
+ push_cleanup ((cleanup_fun) hashtable_free,
+ parent_sortkey_hash, 0);
+ }
+
+ /* Remember this structure for use by nextkey. */
+ hashtable_install (parent_sortkey_hash,
+ wrap->name, strlen (wrap->name), sortkey_hash);
+
+ if (firstkey)
+ return copy_datum (firstkey->key);
+ else
+ return empty_datum; /* dptr is NULL, so no copy needed */
+}
+
+datum man_gdbm_nextkey (man_gdbm_wrapper wrap, datum key)
+{
+ struct hashtable *sortkey_hash;
+ struct sortkey *sortkey;
+
+ if (!parent_sortkey_hash)
+ return empty_datum;
+ sortkey_hash = hashtable_lookup (parent_sortkey_hash,
+ wrap->name, strlen (wrap->name));
+ if (!sortkey_hash)
+ return empty_datum;
+
+ sortkey = hashtable_lookup (sortkey_hash,
+ MYDBM_DPTR (key), MYDBM_DSIZE (key));
+ if (!sortkey || !sortkey->next)
+ return empty_datum;
+
+ return copy_datum (sortkey->next->key);
+}
+
+struct timespec man_gdbm_get_time (man_gdbm_wrapper wrap)
+{
+ struct stat st;
+
+ if (fstat (gdbm_fdesc (wrap->file), &st) < 0) {
+ struct timespec t;
+ t.tv_sec = -1;
+ t.tv_nsec = -1;
+ return t;
+ }
+ return get_stat_mtime (&st);
+}
+
+void man_gdbm_set_time (man_gdbm_wrapper wrap, const struct timespec time)
+{
+ struct timespec times[2];
+
+ times[0] = time;
+ times[1] = time;
+ futimens (gdbm_fdesc (wrap->file), times);
+}
+
+void man_gdbm_close (man_gdbm_wrapper wrap)
+{
+ if (!wrap)
+ return;
+
+ if (parent_sortkey_hash) {
+ struct hashtable *sortkey_hash =
+ hashtable_lookup (parent_sortkey_hash,
+ wrap->name, strlen (wrap->name));
+ if (sortkey_hash)
+ hashtable_remove (parent_sortkey_hash,
+ wrap->name, strlen (wrap->name));
+ }
+
+ free (wrap->name);
+ gdbm_close (wrap->file);
+ free (wrap);
+}
+
+#ifndef HAVE_GDBM_EXISTS
+
+int gdbm_exists (GDBM_FILE file, datum key)
+{
+ char *memory;
+
+ memory = MYDBM_DPTR (gdbm_fetch (file, key));
+ if (memory) {
+ free (memory);
+ return 1;
+ }
+
+ return 0;
+}
+
+#endif /* !HAVE_GDBM_EXISTS */
+
+#endif /* GDBM */
diff --git a/libdb/db_lookup.c b/libdb/db_lookup.c
new file mode 100644
index 0000000..140a505
--- /dev/null
+++ b/libdb/db_lookup.c
@@ -0,0 +1,493 @@
+/*
+ * db_lookup.c: low level database interface routines for man.
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ * Copyright (C) 2001, 2002, 2003, 2006, 2007, 2008, 2009, 2012
+ * Colin Watson.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "fnmatch.h"
+#include "regex.h"
+#include "xvasprintf.h"
+
+#include "gettext.h"
+#define _(String) gettext (String)
+
+#include "manconfig.h"
+
+#include "error.h"
+#include "lower.h"
+#include "wordfnmatch.h"
+#include "xregcomp.h"
+
+#include "mydbm.h"
+#include "db_storage.h"
+
+/* If using ndbm or BTREE, copy the static storage before doing anything
+ * interesting with it. If using gdbm, firstkey and nextkey need to copy the
+ * storage because our ordered wrappers keep an effectively static copy.
+ */
+datum copy_datum (datum dat)
+{
+ if (MYDBM_DPTR (dat)) {
+ MYDBM_SET_DPTR (dat, memcpy (xmalloc (MYDBM_DSIZE (dat) + 1),
+ MYDBM_DPTR (dat),
+ MYDBM_DSIZE (dat)));
+ MYDBM_DPTR (dat)[MYDBM_DSIZE (dat)] = '\0';
+ }
+ return dat;
+}
+
+/* gdbm does locking itself. */
+#if defined(NDBM) || defined(BTREE)
+void gripe_lock (char *filename)
+{
+ error (0, errno, _("can't lock index cache %s"), filename);
+}
+#endif /* NDBM || BTREE */
+
+/* issue fatal message, then exit */
+void gripe_corrupt_data (void)
+{
+ error (FATAL, 0, _("index cache %s corrupt"), database);
+}
+
+/* deal with situation where we cannot replace a key */
+void gripe_replace_key (const char *data)
+{
+ error (0, 0, _("cannot replace key %s"), data);
+ gripe_corrupt_data ();
+}
+
+static char *copy_if_set (const char *str)
+{
+ if (STREQ (str, "-"))
+ return NULL;
+ else
+ return xstrdup (str);
+}
+
+const char *dash_if_unset (const char *str)
+{
+ if (str)
+ return str;
+ else
+ return "-";
+}
+
+/* Just print out what would be stored in the db */
+void dbprintf (const struct mandata *info)
+{
+ debug ("name: %s\n"
+ "sec. ext: %s\n"
+ "section: %s\n"
+ "comp. ext: %s\n"
+ "id: %c\n"
+ "mtime: %ld.%09ld\n"
+ "pointer: %s\n"
+ "filter: %s\n"
+ "whatis: %s\n\n",
+ dash_if_unset (info->name),
+ info->ext, info->sec, info->comp,
+ info->id, (long) info->mtime.tv_sec, (long) info->mtime.tv_nsec,
+ info->pointer, info->filter, info->whatis);
+}
+
+/* Form a multi-style key from page and extension info. The page should
+ * *not* be name_to_key()'d - that should only happen to the parent.
+ */
+datum make_multi_key (const char *page, const char *ext)
+{
+ datum key;
+
+ memset (&key, 0, sizeof key);
+ MYDBM_SET (key, xasprintf ("%s\t%s", page, ext));
+ return key;
+}
+
+/* Free allocated elements of a mandata structure, but not the structure
+ * itself.
+ */
+void free_mandata_elements (struct mandata *pinfo)
+{
+ if (pinfo->addr)
+ /* TODO: this memory appears to be properly owned by the
+ * caller; why do we free it here?
+ */
+ free (pinfo->addr); /* free the 'content' */
+ free (pinfo->name); /* free the real name */
+}
+
+/* Go through the linked list of structures, free()ing the 'content' and the
+ * structs themselves.
+ */
+void free_mandata_struct (struct mandata *pinfo)
+{
+ while (pinfo) {
+ struct mandata *next;
+
+ next = pinfo->next;
+ free_mandata_elements (pinfo);
+ free (pinfo); /* free the structure */
+ pinfo = next;
+ }
+}
+
+/* Get the key that should be used for a given name. The caller is
+ * responsible for freeing the return value.
+ */
+char *name_to_key (const char *name)
+{
+ return lower (name);
+}
+
+/* return char ptr array to the data's fields */
+static char **split_data (char *content, char *start[])
+{
+ int count;
+
+ /* initialise pointers to first N-1 fields */
+ for (count = 0; count < FIELDS - 1 ; count++) {
+ start[count] = strsep (&content, "\t");
+ if (!start[count]) {
+ error (0, 0,
+ ngettext ("only %d field in content",
+ "only %d fields in content", count),
+ count);
+ gripe_corrupt_data ();
+ }
+ }
+
+ /* initialise pointer to Nth field (whatis) */
+ start[FIELDS - 1] = content;
+ if (!start[FIELDS - 1]) {
+ error (0, 0,
+ ngettext ("only %d field in content",
+ "only %d fields in content", FIELDS - 1),
+ FIELDS - 1);
+ gripe_corrupt_data ();
+ }
+
+ return start;
+}
+
+/* Parse the db-returned data and put it into a mandata format */
+void split_content (char *cont_ptr, struct mandata *pinfo)
+{
+ char *start[FIELDS];
+ char **data;
+
+ data = split_data (cont_ptr, start);
+
+ pinfo->name = copy_if_set (*(data++));
+ pinfo->ext = *(data++);
+ pinfo->sec = *(data++);
+ pinfo->mtime.tv_sec = (time_t) atol (*(data++));
+ pinfo->mtime.tv_nsec = atol (*(data++));
+ pinfo->id = **(data++); /* single char id */
+ pinfo->pointer = *(data++);
+ pinfo->filter = *(data++);
+ pinfo->comp = *(data++);
+ pinfo->whatis = *(data);
+
+ pinfo->addr = cont_ptr;
+ pinfo->next = (struct mandata *) NULL;
+}
+
+/* Extract all of the names/extensions associated with this key. Each case
+ * variant of a name will be returned separately.
+ *
+ * names and ext should be pointers to valid memory which will be filled in
+ * with the address of the allocated arrays of names and extensions. The
+ * caller is expected to free these arrays.
+ */
+int list_extensions (char *data, char ***names, char ***ext)
+{
+ int count = 0;
+ int bound = 4; /* most multi keys will have fewer than this */
+
+ *names = xnmalloc (bound, sizeof **names);
+ *ext = xnmalloc (bound, sizeof **ext);
+ while (((*names)[count] = strsep (&data, "\t")) != NULL) {
+ (*ext)[count] = strsep (&data, "\t");
+ if ((*ext)[count])
+ ++count;
+ else
+ break;
+
+ if (count >= bound) {
+ bound *= 2;
+ *names = xnrealloc (*names, bound, sizeof **names);
+ *ext = xnrealloc (*ext, bound, sizeof **ext);
+ }
+ }
+
+ debug ("found %d names/extensions\n", count);
+ return count;
+}
+
+/* These should be bitwise-ored together. */
+#define ALL 0
+#define EXACT 1
+#define MATCH_CASE 2
+
+/*
+ There are three possibilities on lookup:
+
+ 1) No data exists, lookup will fail, returned structure will be NULL.
+ 2) One data item exists. Item is returned as first in set of structures.
+ 3) Many items exist. They are all returned, in a multiple structure set.
+ */
+static struct mandata *dblookup (MYDBM_FILE dbf, const char *page,
+ const char *section, int flags)
+{
+ struct mandata *info = NULL;
+ datum key, cont;
+
+ memset (&key, 0, sizeof key);
+ memset (&cont, 0, sizeof cont);
+
+ MYDBM_SET (key, name_to_key (page));
+ cont = MYDBM_FETCH (dbf, key);
+ MYDBM_FREE_DPTR (key);
+
+ if (MYDBM_DPTR (cont) == NULL) { /* No entries at all */
+ return info; /* indicate no entries */
+ } else if (*MYDBM_DPTR (cont) != '\t') { /* Just one entry */
+ info = infoalloc ();
+ split_content (MYDBM_DPTR (cont), info);
+ if (!info->name)
+ info->name = xstrdup (page);
+ if (!(flags & MATCH_CASE) || STREQ (info->name, page)) {
+ if (section == NULL)
+ return info;
+ if (flags & EXACT) {
+ if (STREQ (section, info->ext))
+ return info;
+ } else {
+ if (STRNEQ (section, info->ext,
+ strlen (section)))
+ return info;
+ }
+ }
+ free_mandata_struct (info);
+ return NULL;
+ } else { /* multiple entries */
+ char **names, **ext;
+ struct mandata *ret = NULL;
+ int refs, i;
+
+ /* Extract all of the case-variant-names/extensions
+ * associated with this key.
+ */
+
+ refs = list_extensions (MYDBM_DPTR (cont) + 1, &names, &ext);
+
+ /* Make the multi keys and look them up */
+
+ for (i = 0; i < refs; ++i) {
+ datum multi_cont;
+
+ memset (&multi_cont, 0, sizeof multi_cont);
+
+ /* Decide whether this part of a multi key is
+ * suitable.
+ */
+
+ if ((flags & MATCH_CASE) && !STREQ (names[i], page))
+ continue;
+
+ if (section != NULL) {
+ if (flags & EXACT) {
+ if (!STREQ (section, ext[i]))
+ continue;
+ } else {
+ if (!STRNEQ (section, ext[i],
+ strlen (section)))
+ continue;
+ }
+ }
+
+ /* So the key is suitable ... */
+ key = make_multi_key (names[i], ext[i]);
+ debug ("multi key lookup (%s)\n", MYDBM_DPTR (key));
+ multi_cont = MYDBM_FETCH (dbf, key);
+ if (MYDBM_DPTR (multi_cont) == NULL) {
+ error (0, 0, _("bad fetch on multi key %s"),
+ MYDBM_DPTR (key));
+ gripe_corrupt_data ();
+ }
+ MYDBM_FREE_DPTR (key);
+
+ /* allocate info struct, fill it in and
+ point info to the next in the list */
+ if (!ret)
+ ret = info = infoalloc ();
+ else
+ info = info->next = infoalloc ();
+ split_content (MYDBM_DPTR (multi_cont), info);
+ if (!info->name)
+ info->name = xstrdup (names[i]);
+ }
+
+ free (names);
+ free (ext);
+ MYDBM_FREE_DPTR (cont);
+ return ret;
+ }
+}
+
+struct mandata *dblookup_all (MYDBM_FILE dbf, const char *page,
+ const char *section, int match_case)
+{
+ return dblookup (dbf, page, section,
+ ALL | (match_case ? MATCH_CASE : 0));
+}
+
+struct mandata *dblookup_exact (MYDBM_FILE dbf, const char *page,
+ const char *section, int match_case)
+{
+ return dblookup (dbf, page, section,
+ EXACT | (match_case ? MATCH_CASE : 0));
+}
+
+struct mandata *dblookup_pattern (MYDBM_FILE dbf, const char *pattern,
+ const char *section, int match_case,
+ int pattern_regex, int try_descriptions)
+{
+ struct mandata *ret = NULL, *tail = NULL;
+ datum key, cont;
+ regex_t preg;
+
+ if (pattern_regex)
+ xregcomp (&preg, pattern,
+ REG_EXTENDED | REG_NOSUB |
+ (match_case ? 0 : REG_ICASE));
+
+#ifndef BTREE
+ datum nextkey;
+
+ key = MYDBM_FIRSTKEY (dbf);
+ while (MYDBM_DPTR (key)) {
+ cont = MYDBM_FETCH (dbf, key);
+#else /* BTREE */
+ int end;
+
+ end = btree_nextkeydata (dbf, &key, &cont);
+ while (!end) {
+#endif /* !BTREE */
+ struct mandata info;
+ char *tab;
+ int got_match;
+
+ memset (&info, 0, sizeof (info));
+
+ if (!MYDBM_DPTR (cont))
+ {
+ debug ("key was %s\n", MYDBM_DPTR (key));
+ error (FATAL, 0,
+ _("Database %s corrupted; rebuild with "
+ "mandb --create"),
+ database);
+ }
+
+ if (*MYDBM_DPTR (key) == '$')
+ goto nextpage;
+
+ if (*MYDBM_DPTR (cont) == '\t')
+ goto nextpage;
+
+ /* a real page */
+
+ split_content (MYDBM_DPTR (cont), &info);
+
+ /* If there's a section given, does it match either the
+ * section or extension of this page?
+ */
+ if (section &&
+ (!STREQ (section, info.sec) && !STREQ (section, info.ext)))
+ goto nextpage;
+
+ tab = strrchr (MYDBM_DPTR (key), '\t');
+ if (tab)
+ *tab = '\0';
+
+ if (!info.name)
+ info.name = xstrdup (MYDBM_DPTR (key));
+
+ if (pattern_regex)
+ got_match = (regexec (&preg, info.name,
+ 0, NULL, 0) == 0);
+ else
+ got_match = fnmatch (pattern, info.name,
+ match_case ? 0
+ : FNM_CASEFOLD) == 0;
+ if (try_descriptions && !got_match && info.whatis) {
+ if (pattern_regex)
+ got_match = (regexec (&preg, info.whatis,
+ 0, NULL, 0) == 0);
+ else
+ got_match = word_fnmatch (pattern,
+ info.whatis);
+ }
+ if (!got_match)
+ goto nextpage_tab;
+
+ if (!ret)
+ ret = tail = infoalloc ();
+ else
+ tail = tail->next = infoalloc ();
+ memcpy (tail, &info, sizeof (info));
+ info.name = NULL; /* steal memory */
+ MYDBM_SET_DPTR (cont, NULL); /* == info.addr */
+
+nextpage_tab:
+ if (tab)
+ *tab = '\t';
+nextpage:
+#ifndef BTREE
+ nextkey = MYDBM_NEXTKEY (dbf, key);
+ MYDBM_FREE_DPTR (cont);
+ MYDBM_FREE_DPTR (key);
+ key = nextkey;
+#else /* BTREE */
+ MYDBM_FREE_DPTR (cont);
+ MYDBM_FREE_DPTR (key);
+ end = btree_nextkeydata (dbf, &key, &cont);
+#endif /* !BTREE */
+ info.addr = NULL;
+ free_mandata_elements (&info);
+ }
+
+ if (pattern_regex)
+ regfree (&preg);
+
+ return ret;
+}
diff --git a/libdb/db_ndbm.c b/libdb/db_ndbm.c
new file mode 100644
index 0000000..af97032
--- /dev/null
+++ b/libdb/db_ndbm.c
@@ -0,0 +1,128 @@
+/*
+ * db_ndbm.c: low level ndbm interface routines for man.
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#ifdef NDBM
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <sys/file.h> /* for flock() */
+#include <sys/types.h> /* for open() */
+#include <sys/stat.h>
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#include <unistd.h>
+
+#include "stat-time.h"
+#include "timespec.h"
+#include "xvasprintf.h"
+
+#include "manconfig.h"
+
+#include "mydbm.h"
+#include "db_storage.h"
+
+/* release the lock and close the database */
+int ndbm_flclose (DBM *db)
+{
+ flock (dbm_dirfno (db), LOCK_UN);
+ dbm_close (db);
+ return 0;
+}
+
+/* open a ndbm type database, with file locking. */
+DBM* ndbm_flopen (char *filename, int flags, int mode)
+{
+ DBM *db;
+ int lock_op;
+ int lock_failed;
+
+ if (flags & ~O_RDONLY) {
+ /* flags includes O_RDWR or O_WRONLY, need an exclusive lock */
+ lock_op = LOCK_EX | LOCK_NB;
+ } else {
+ lock_op = LOCK_SH | LOCK_NB;
+ }
+
+ if (flags & O_TRUNC) {
+ /* opening the db is destructive, need to lock first */
+ char *dir_fname;
+ int dir_fd;
+
+ db = NULL;
+ lock_failed = 1;
+ dir_fname = xasprintf ("%s.dir", filename);
+ dir_fd = open (dir_fname, flags & ~O_TRUNC, mode);
+ free (dir_fname);
+ if (dir_fd != -1) {
+ if (!(lock_failed = flock (dir_fd, lock_op)))
+ db = dbm_open (filename, flags, mode);
+ close (dir_fd);
+ }
+ } else {
+ db = dbm_open (filename, flags, mode);
+ if (db)
+ lock_failed = flock (dbm_dirfno (db), lock_op);
+ }
+
+ if (!db)
+ return NULL;
+
+ if (lock_failed) {
+ gripe_lock (filename);
+ dbm_close (db);
+ return NULL;
+ }
+
+ return db;
+}
+
+struct timespec ndbm_get_time (DBM *db)
+{
+ struct stat st;
+
+ if (fstat (dbm_dirfno (db), &st) < 0) {
+ struct timespec t;
+ t.tv_sec = -1;
+ t.tv_nsec = -1;
+ return t;
+ }
+ return get_stat_mtime (&st);
+}
+
+void ndbm_set_time (DBM *db, const struct timespec time)
+{
+ struct timespec times[2];
+
+ times[0] = time;
+ times[1] = time;
+ futimens (dbm_dirfno (db), times);
+}
+
+#endif /* NDBM */
diff --git a/libdb/db_storage.h b/libdb/db_storage.h
new file mode 100644
index 0000000..6db37bb
--- /dev/null
+++ b/libdb/db_storage.h
@@ -0,0 +1,104 @@
+/*
+ * db_storage.h: define mandata structure, some macros and prototypes
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ * Copyright (C) 2002, 2003, 2007, 2008 Colin Watson.
+ *
+ * This file is part of man-db.
+ *
+ * man-db is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * man-db is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with man-db; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Sat Oct 29 13:09:31 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifndef DB_STORAGE_H
+#define DB_STORAGE_H
+
+/* These definitions give an inherent precedence to each particular type
+ of manual page:
+
+ ULT_MAN: ultimate manual page, the full source nroff file.
+ SO_MAN: source nroff file containing .so request to an ULT_MAN.
+ WHATIS_MAN: virtual `whatis referenced' page pointing to an ULT_MAN.
+ STRAY_CAT: pre-formatted manual page with no source.
+ WHATIS_CAT: virtual `whatis referenced' page pointing to a STRAY_CAT. */
+
+/* WHATIS_MAN and WHATIS_CAT are deprecated. */
+
+#define ULT_MAN 'A'
+#define SO_MAN 'B'
+#define WHATIS_MAN 'C'
+#define STRAY_CAT 'D'
+#define WHATIS_CAT 'E'
+
+#define FIELDS 10 /* No of fields in each database page `content' */
+
+#include "timespec.h"
+
+#include "xalloc.h"
+
+#include "mydbm.h"
+
+struct mandata {
+ struct mandata *next; /* ptr to next structure, if any */
+ char *addr; /* ptr to memory containing the fields */
+
+ char *name; /* Name of page, if != key */
+
+ /* The following are all const because they should be pointers to
+ * parts of strings allocated elsewhere (often the addr field above)
+ * and should not be written through or freed themselves.
+ */
+ const char *ext; /* Filename ext w/o comp ext */
+ const char *sec; /* Section name/number */
+ char id; /* id for this entry */
+ const char *pointer; /* id related file pointer */
+ const char *comp; /* Compression extension */
+ const char *filter; /* filters needed for the page */
+ const char *whatis; /* whatis description for page */
+ struct timespec mtime; /* mod time for file */
+};
+
+/* used by the world */
+extern struct mandata *dblookup_all (MYDBM_FILE dbf, const char *page,
+ const char *section, int match_case);
+extern struct mandata *dblookup_exact (MYDBM_FILE dbf, const char *page,
+ const char *section, int match_case);
+extern struct mandata *dblookup_pattern (MYDBM_FILE dbf, const char *page,
+ const char *section, int match_case,
+ int pattern_regex,
+ int try_descriptions);
+extern int dbstore (MYDBM_FILE dbf, struct mandata *in, const char *base);
+extern int dbdelete (MYDBM_FILE dbf, const char *name, struct mandata *in);
+extern void dbprintf (const struct mandata *info);
+extern void free_mandata_elements (struct mandata *pinfo);
+extern void free_mandata_struct (struct mandata *pinfo);
+extern void split_content (char *cont_ptr, struct mandata *pinfo);
+extern int compare_ids (char a, char b, int promote_links);
+
+/* local to db routines */
+extern void gripe_lock (char *filename);
+extern void gripe_corrupt_data (void);
+extern datum make_multi_key (const char *page, const char *ext);
+
+/* allocate a mandata structure */
+#define infoalloc() XZALLOC (struct mandata)
+
+extern char *name_to_key (const char *name);
+extern int list_extensions (char *data, char ***names, char ***ext);
+extern void gripe_replace_key (const char *data);
+extern const char *dash_if_unset (const char *str);
+
+#endif
diff --git a/libdb/db_store.c b/libdb/db_store.c
new file mode 100644
index 0000000..062db71
--- /dev/null
+++ b/libdb/db_store.c
@@ -0,0 +1,369 @@
+/*
+ * db_store.c: dbstore(), database storage routine.
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ * Copyright (C) 2001, 2002 Colin Watson.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "timespec.h"
+#include "xvasprintf.h"
+
+#include "gettext.h"
+#define _(String) gettext (String)
+
+#include "manconfig.h"
+
+#include "error.h"
+
+#include "mydbm.h"
+#include "db_storage.h"
+
+/* compare_ids(a,b) is negative if id 'a' is preferred to id 'b', i.e. if
+ * 'a' is a more canonical database entry than 'b'; positive if 'b' is
+ * preferred to 'a'; and zero if they are equivalent. This usually goes in
+ * comparison order, but there's a special exception when FAVOUR_STRAYCATS
+ * is set.
+ *
+ * If promote_links is true, consider SO_MAN equivalent to ULT_MAN. This is
+ * appropriate when sorting candidate pages for display.
+ */
+int compare_ids (char a, char b, int promote_links)
+{
+#ifdef FAVOUR_STRAYCATS
+ if (a == WHATIS_MAN && b == STRAY_CAT)
+ return 1;
+ else if (a == STRAY_CAT && b == WHATIS_MAN)
+ return -1;
+#endif
+
+ if (promote_links) {
+ if ((a == ULT_MAN && b == SO_MAN) ||
+ (a == SO_MAN && b == ULT_MAN))
+ return 0;
+ }
+
+ if (a < b)
+ return -1;
+ else if (a > b)
+ return 1;
+ else
+ return 0;
+}
+
+/* The do_we_replace logic. Decide, for some existing key, whether it should
+ * be replaced with some new contents. Check that names and section
+ * extensions match before calling this.
+ */
+static int replace_if_necessary (MYDBM_FILE dbf,
+ struct mandata *newdata,
+ struct mandata *olddata,
+ datum newkey, datum newcont)
+{
+ /* It's OK to replace ULT_MAN with SO_MAN if the mtime is newer. It
+ * isn't OK to replace a real page (either ULT_MAN or SO_MAN) with a
+ * whatis reference; if the real page really went away then
+ * purge_missing will catch that in time, but a real page that still
+ * exists should always take precedence.
+ */
+ if (compare_ids (newdata->id, olddata->id, 1) <= 0 &&
+ timespec_cmp (newdata->mtime, olddata->mtime) > 0) {
+ debug ("replace_if_necessary(): newer mtime; replacing\n");
+ if (MYDBM_REPLACE (dbf, newkey, newcont))
+ gripe_replace_key (MYDBM_DPTR (newkey));
+ return 0;
+ }
+
+ if (compare_ids (newdata->id, olddata->id, 0) < 0) {
+ if (MYDBM_REPLACE (dbf, newkey, newcont))
+ gripe_replace_key (MYDBM_DPTR (newkey));
+ return 0;
+ }
+
+ /* TODO: name fields should be collated with the requested name */
+
+ if (newdata->id == olddata->id) {
+ if (STREQ (dash_if_unset (newdata->comp), olddata->comp))
+ return 0; /* same file */
+ else {
+ debug ("ignoring differing compression "
+ "extensions: %s\n", MYDBM_DPTR (newkey));
+ return 1; /* differing exts */
+ }
+ }
+
+ debug ("ignoring differing ids: %s\n", MYDBM_DPTR (newkey));
+ return 0;
+}
+
+/* The complement of split_content */
+static datum make_content (struct mandata *in)
+{
+ datum cont;
+ static const char dash[] = "-";
+
+ memset (&cont, 0, sizeof cont);
+
+ if (!in->pointer)
+ in->pointer = dash;
+ if (!in->filter)
+ in->filter = dash;
+ if (!in->comp)
+ in->comp = dash;
+ if (!in->whatis)
+ in->whatis = dash + 1;
+
+ MYDBM_SET (cont, xasprintf (
+ "%s\t%s\t%s\t%ld\t%ld\t%c\t%s\t%s\t%s\t%s",
+ dash_if_unset (in->name),
+ in->ext,
+ in->sec,
+ (long) in->mtime.tv_sec,
+ (long) in->mtime.tv_nsec,
+ in->id,
+ in->pointer,
+ in->filter,
+ in->comp,
+ in->whatis));
+
+#ifdef NDBM
+ /* limit of 4096 bytes of data using ndbm */
+ if (MYDBM_DSIZE (cont) > 4095) {
+ MYDBM_DPTR (cont)[4095] = '\0';
+ MYDBM_DSIZE (cont) = 4096;
+ }
+#endif
+ return cont;
+}
+
+/*
+ Any one of three situations can occur when storing some data.
+
+ 1) no simple key is found.
+ store as singular reference.
+ 2) simple key already exists, content starts with a '\t'.
+ Already multiple reference. Add our new item in multiple format
+ and update the simple key content, to point to our new one also.
+ 3) simple key already exists, content does not start with a '\t'.
+ First we have to reformat the simple key into a multi key for the
+ old item, and insert. Then we have to insert the new data as a
+ multi key. Lastly we must create the simple key and do a replace
+ on it.
+
+ Use precedence algorithm on inserts. If we already have a key assigned
+ to the new value, check priority of page using id. If new page is higher
+ (lower value), replace old with new, otherwise ignore new page.
+
+ If we have two ULT_MAN pages competing for the same key, we must have
+ more than one of foo.sec, foo.sec.comp1, foo.sec.comp2. OR we have a
+ replacement page. If the mtimes differ, throw out the old struct and
+ replace it with the new, if the comp exts differ, oops, this is bad,
+ keep one and return appropriate error code.
+
+ If we have two WHATIS_MAN pages or a WHATIS_MAN and a SO_MAN page
+ competing for the same key, don't worry. This will happen a lot and is
+ not a problem.
+
+ return errorcode or 0 on success.
+*/
+int dbstore (MYDBM_FILE dbf, struct mandata *in, const char *base)
+{
+ datum oldkey, oldcont;
+
+ memset (&oldkey, 0, sizeof oldkey);
+ memset (&oldcont, 0, sizeof oldcont);
+
+ /* create a simple key */
+ MYDBM_SET (oldkey, name_to_key (base));
+ if (!*base) {
+ dbprintf (in);
+ return 2;
+ }
+
+ if (in->name) {
+ error (0, 0, "in->name (%s) should not be set when calling "
+ "dbstore()!\n",
+ in->name);
+ free (in->name);
+ in->name = NULL;
+ }
+
+ /* get the content for the simple key */
+
+ oldcont = MYDBM_FETCH (dbf, oldkey);
+
+ if (MYDBM_DPTR (oldcont) == NULL) { /* situation (1) */
+ if (!STREQ (base, MYDBM_DPTR (oldkey)))
+ in->name = xstrdup (base);
+ oldcont = make_content (in);
+ if (MYDBM_REPLACE (dbf, oldkey, oldcont))
+ gripe_replace_key (MYDBM_DPTR (oldkey));
+ MYDBM_FREE_DPTR (oldcont);
+ free (in->name);
+ in->name = NULL;
+ } else if (*MYDBM_DPTR (oldcont) == '\t') { /* situation (2) */
+ datum newkey, newcont;
+
+ memset (&newkey, 0, sizeof newkey);
+ memset (&newcont, 0, sizeof newcont);
+
+ newkey = make_multi_key (base, in->ext);
+ newcont = make_content (in);
+
+ /* Try to insert the new multi data */
+
+ if (MYDBM_INSERT (dbf, newkey, newcont)) {
+ datum cont;
+ struct mandata info;
+ int ret;
+
+ MYDBM_FREE_DPTR (oldcont);
+ cont = MYDBM_FETCH (dbf, newkey);
+ split_content (MYDBM_DPTR (cont), &info);
+ ret = replace_if_necessary (dbf, in, &info,
+ newkey, newcont);
+ /* MYDBM_FREE_DPTR (cont); */
+ free_mandata_elements (&info);
+ MYDBM_FREE_DPTR (newkey);
+ MYDBM_FREE_DPTR (newcont);
+ MYDBM_FREE_DPTR (oldkey);
+
+ return ret;
+ }
+
+ /* Now lets add some info to the simple key's cont. */
+
+ /* This next bit needs to be done first as we'll wipe out
+ MYDBM_DPTR (oldcont) otherwise (for NDBM only!) */
+
+ MYDBM_FREE_DPTR (newkey);
+ MYDBM_FREE_DPTR (newcont);
+
+ MYDBM_SET (newcont, xasprintf (
+ "%s\t%s\t%s", MYDBM_DPTR (oldcont), base, in->ext));
+ MYDBM_FREE_DPTR (oldcont);
+
+ /* Try to replace the old simple data with the new stuff */
+
+ if (MYDBM_REPLACE (dbf, oldkey, newcont))
+ gripe_replace_key (MYDBM_DPTR (oldkey));
+
+ MYDBM_FREE_DPTR (newcont);
+ } else { /* situation (3) */
+ datum newkey, newcont, lastkey, lastcont;
+ struct mandata old;
+ char *old_name;
+
+ memset (&newkey, 0, sizeof newkey);
+ memset (&newcont, 0, sizeof newcont);
+ memset (&lastkey, 0, sizeof lastkey);
+ memset (&lastcont, 0, sizeof lastcont);
+
+ /* Extract the old singular reference */
+
+ split_content (MYDBM_DPTR (oldcont), &old);
+
+ /* Create multi keys for both old
+ and new items, create new content */
+
+ if (old.name)
+ old_name = xstrdup (old.name);
+ else
+ old_name = xstrdup (MYDBM_DPTR (oldkey));
+
+ lastkey = make_multi_key (old_name, old.ext);
+
+ /* Check against identical multi keys before inserting
+ into db */
+
+ if (STREQ (old_name, base) && STREQ (old.ext, in->ext)) {
+ int ret;
+
+ if (!STREQ (base, MYDBM_DPTR (oldkey)))
+ in->name = xstrdup (base);
+ newcont = make_content (in);
+ ret = replace_if_necessary (dbf, in, &old,
+ oldkey, newcont);
+ /* MYDBM_FREE_DPTR (oldcont); */
+ free_mandata_elements (&old);
+ MYDBM_FREE_DPTR (newcont);
+ MYDBM_FREE_DPTR (lastkey);
+ MYDBM_FREE_DPTR (oldkey);
+ free (old_name);
+ free (in->name);
+ in->name = NULL;
+
+ return ret;
+ }
+
+ /* Multi keys use the proper case, and so don't need a name
+ * field.
+ */
+ if (old.name) {
+ free (old.name);
+ old.name = NULL;
+ }
+
+ lastcont = make_content (&old);
+
+ /* We always replace here; if the multi key already exists
+ * in the database, then that indicates some kind of
+ * database corruption, but our new multi key is almost
+ * certainly better.
+ */
+ if (MYDBM_REPLACE (dbf, lastkey, lastcont))
+ gripe_replace_key (MYDBM_DPTR (lastkey));
+
+ MYDBM_FREE_DPTR (lastkey);
+ MYDBM_FREE_DPTR (lastcont);
+
+ newkey = make_multi_key (base, in->ext);
+ newcont = make_content (in);
+
+ if (MYDBM_REPLACE (dbf, newkey, newcont))
+ gripe_replace_key (MYDBM_DPTR (newkey));
+
+ MYDBM_FREE_DPTR (newkey);
+ MYDBM_FREE_DPTR (newcont);
+
+ /* Now build a simple reference to the above two items */
+
+ MYDBM_SET (newcont, xasprintf (
+ "\t%s\t%s\t%s\t%s", old_name, old.ext, base, in->ext));
+
+ if (MYDBM_REPLACE (dbf, oldkey, newcont))
+ gripe_replace_key (MYDBM_DPTR (oldkey));
+
+ /* MYDBM_FREE_DPTR (oldcont); */
+ free_mandata_elements (&old);
+ MYDBM_FREE_DPTR (newcont);
+ free (old_name);
+ }
+
+ MYDBM_FREE_DPTR (oldkey);
+ return 0;
+}
diff --git a/libdb/db_ver.c b/libdb/db_ver.c
new file mode 100644
index 0000000..5ac306d
--- /dev/null
+++ b/libdb/db_ver.c
@@ -0,0 +1,83 @@
+/*
+ * dbver.c: code to read, write and identify the database version no.
+ *
+ * Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
+ * Copyright (C) 2001, 2002 Colin Watson.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Mon Aug 18 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "gettext.h"
+#define _(String) gettext (String)
+
+#include "manconfig.h"
+
+#include "error.h"
+
+#include "mydbm.h"
+
+int dbver_rd (MYDBM_FILE dbfile)
+{
+ datum key, content;
+
+ memset (&key, 0, sizeof key);
+
+ MYDBM_SET (key, xstrdup (VER_KEY));
+
+ content = MYDBM_FETCH (dbfile, key);
+
+ MYDBM_FREE_DPTR (key);
+
+ if (MYDBM_DPTR (content) == NULL) {
+ debug (_("warning: %s has no version identifier\n"), database);
+ return 1;
+ } else if (!STREQ (MYDBM_DPTR (content), VER_ID)) {
+ debug (_("warning: %s is version %s, expecting %s\n"),
+ database, MYDBM_DPTR (content), VER_ID);
+ MYDBM_FREE_DPTR (content);
+ return 1;
+ } else {
+ MYDBM_FREE_DPTR (content);
+ return 0;
+ }
+}
+
+void dbver_wr (MYDBM_FILE dbfile)
+{
+ datum key, content;
+
+ memset (&key, 0, sizeof key);
+ memset (&content, 0, sizeof content);
+
+ MYDBM_SET (key, xstrdup (VER_KEY));
+ MYDBM_SET (content, xstrdup (VER_ID));
+
+ if (MYDBM_INSERT (dbfile, key, content) != 0)
+ error (FATAL, 0,
+ _("fatal: unable to insert version identifier into %s"),
+ database);
+
+ MYDBM_FREE_DPTR (key);
+ MYDBM_FREE_DPTR (content);
+}
diff --git a/libdb/mydbm.h b/libdb/mydbm.h
new file mode 100644
index 0000000..567e96a
--- /dev/null
+++ b/libdb/mydbm.h
@@ -0,0 +1,189 @@
+/*
+ * mydbm.h: database interface definitions and prototypes.
+ *
+ * Copyright (C) 1994, 1995, Graeme W. Wilford. (Wilf.)
+ *
+ * This file is part of man-db.
+ *
+ * man-db is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * man-db is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with man-db; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Header file to make programming independent of db type used
+ *
+ * Currently satisfies:
+ *
+ * *hash based*
+ * GNU dbm: (gdbm & ndbm)
+ * Berkeley db: (ndbm)
+ * `native': (ndbm)
+ *
+ * *binary tree based*
+ * Berkeley db: (BTREE)
+ *
+ * Tue Apr 26 12:56:44 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ */
+
+#ifndef MYDBM_H
+# define MYDBM_H
+
+# include "timespec.h"
+
+# if defined(GDBM) && !defined(NDBM) && !defined(BTREE)
+
+# include <gdbm.h>
+
+# ifndef HAVE_GDBM_EXISTS
+extern int gdbm_exists (GDBM_FILE db, datum key);
+# endif /* !HAVE_GDBM_EXISTS */
+
+/* gdbm_nextkey() is not lexicographically sorted, so we need to keep the
+ * filename around to use as a hash key.
+ */
+typedef struct {
+ char *name;
+ GDBM_FILE file;
+} *man_gdbm_wrapper;
+
+man_gdbm_wrapper man_gdbm_open_wrapper (const char *name, int flags);
+datum man_gdbm_firstkey (man_gdbm_wrapper wrap);
+datum man_gdbm_nextkey (man_gdbm_wrapper wrap, datum key);
+struct timespec man_gdbm_get_time (man_gdbm_wrapper wrap);
+void man_gdbm_set_time (man_gdbm_wrapper wrap, const struct timespec time);
+void man_gdbm_close (man_gdbm_wrapper wrap);
+
+# define BLK_SIZE 0 /* to invoke normal fs block size */
+# define DB_EXT ".db"
+# define MYDBM_FILE man_gdbm_wrapper
+# define MYDBM_DPTR(d) ((d).dptr)
+# define MYDBM_SET_DPTR(d, value) ((d).dptr = (value))
+# define MYDBM_DSIZE(d) ((d).dsize)
+# define MYDBM_CTRWOPEN(file) \
+ man_gdbm_open_wrapper(file, GDBM_NEWDB|GDBM_FAST)
+# define MYDBM_CRWOPEN(file) \
+ man_gdbm_open_wrapper(file, GDBM_WRCREAT|GDBM_FAST)
+# define MYDBM_RWOPEN(file) \
+ man_gdbm_open_wrapper(file, GDBM_WRITER|GDBM_FAST)
+# define MYDBM_RDOPEN(file) \
+ man_gdbm_open_wrapper(file, GDBM_READER)
+# define MYDBM_INSERT(db, key, cont) gdbm_store((db)->file, key, cont, GDBM_INSERT)
+# define MYDBM_REPLACE(db, key, cont) gdbm_store((db)->file, key, cont, GDBM_REPLACE)
+# define MYDBM_EXISTS(db, key) gdbm_exists((db)->file, key)
+# define MYDBM_DELETE(db, key) gdbm_delete((db)->file, key)
+# define MYDBM_FETCH(db, key) gdbm_fetch((db)->file, key)
+# define MYDBM_CLOSE(db) man_gdbm_close(db)
+# define MYDBM_FIRSTKEY(db) man_gdbm_firstkey(db)
+# define MYDBM_NEXTKEY(db, key) man_gdbm_nextkey(db, key)
+# define MYDBM_GET_TIME(db) man_gdbm_get_time(db)
+# define MYDBM_SET_TIME(db, time) man_gdbm_set_time(db, time)
+# define MYDBM_REORG(db) gdbm_reorganize((db)->file)
+
+# elif defined(NDBM) && !defined(GDBM) && !defined(BTREE)
+
+# include <ndbm.h>
+
+# if HAVE_FCNTL_H
+# include <fcntl.h>
+# endif
+
+/* Berkeley db routines emulate ndbm but don't add .dir & .pag, just .db! */
+# ifdef _DB_H_ /* has Berkeley db.h been included? */
+# define BERKELEY_DB
+# endif /* _DB_H_ */
+
+extern DBM *ndbm_flopen(char *file, int flags, int mode);
+extern struct timespec ndbm_get_time(DBM *db);
+extern void ndbm_set_time(DBM *db, const struct timespec time);
+extern int ndbm_flclose(DBM *db);
+
+# define DB_EXT ""
+# define MYDBM_FILE DBM*
+# define MYDBM_DPTR(d) ((d).dptr)
+# define MYDBM_SET_DPTR(d, value) ((d).dptr = (value))
+# define MYDBM_DSIZE(d) ((d).dsize)
+# define MYDBM_CTRWOPEN(file) ndbm_flopen(file, O_TRUNC|O_CREAT|O_RDWR, DBMODE)
+# define MYDBM_CRWOPEN(file) ndbm_flopen(file, O_CREAT|O_RDWR, DBMODE)
+# define MYDBM_RWOPEN(file) ndbm_flopen(file, O_RDWR, DBMODE)
+# define MYDBM_RDOPEN(file) ndbm_flopen(file, O_RDONLY, DBMODE)
+# define MYDBM_INSERT(db, key, cont) dbm_store(db, key, cont, DBM_INSERT)
+# define MYDBM_REPLACE(db, key, cont) dbm_store(db, key, cont, DBM_REPLACE)
+# define MYDBM_EXISTS(db, key) (dbm_fetch(db, key).dptr != NULL)
+# define MYDBM_DELETE(db, key) dbm_delete(db, key)
+# define MYDBM_FETCH(db, key) copy_datum(dbm_fetch(db, key))
+# define MYDBM_CLOSE(db) ndbm_flclose(db)
+# define MYDBM_FIRSTKEY(db) copy_datum(dbm_firstkey(db))
+# define MYDBM_NEXTKEY(db, key) copy_datum(dbm_nextkey(db))
+# define MYDBM_GET_TIME(db) ndbm_get_time(db)
+# define MYDBM_SET_TIME(db, time) ndbm_set_time(db, time)
+# define MYDBM_REORG(db) /* nothing - not implemented */
+
+# elif defined(BTREE) && !defined(NDBM) && !defined(GDBM)
+
+# include <sys/types.h>
+# include <fcntl.h>
+# include <limits.h>
+# include BDB_H
+
+typedef DBT datum;
+
+extern DB *btree_flopen(char *filename, int flags, int mode);
+extern int btree_close(DB *db);
+extern int btree_exists(DB *db, datum key);
+extern datum btree_fetch(DB *db, datum key);
+extern int btree_insert(DB *db, datum key, datum cont);
+extern datum btree_firstkey(DB *db);
+extern datum btree_nextkey(DB *db);
+extern int btree_replace(DB *db, datum key, datum content);
+extern int btree_nextkeydata(DB *db, datum *key, datum *cont);
+extern struct timespec btree_get_time(DB *db);
+extern void btree_set_time(DB *db, const struct timespec time);
+
+# define DB_EXT ".bt"
+# define MYDBM_FILE DB*
+# define MYDBM_DPTR(d) ((char *) (d).data)
+# define MYDBM_SET_DPTR(d, value) ((d).data = (char *) (value))
+# define MYDBM_DSIZE(d) ((d).size)
+# define MYDBM_CTRWOPEN(file) btree_flopen(file, O_TRUNC|O_CREAT|O_RDWR, DBMODE)
+# define MYDBM_CRWOPEN(file) btree_flopen(file, O_CREAT|O_RDWR, DBMODE)
+# define MYDBM_RWOPEN(file) btree_flopen(file, O_RDWR, DBMODE)
+# define MYDBM_RDOPEN(file) btree_flopen(file, O_RDONLY, DBMODE)
+# define MYDBM_INSERT(db, key, cont) btree_insert(db, key, cont)
+# define MYDBM_REPLACE(db, key, cont) btree_replace(db, key, cont)
+# define MYDBM_EXISTS(db, key) btree_exists(db, key)
+# define MYDBM_DELETE(db, key) ((db->del)(db, &key, 0) ? -1 : 0)
+# define MYDBM_FETCH(db, key) btree_fetch(db, key)
+# define MYDBM_CLOSE(db) btree_close(db)
+# define MYDBM_FIRSTKEY(db) btree_firstkey(db)
+# define MYDBM_NEXTKEY(db, key) btree_nextkey(db)
+# define MYDBM_GET_TIME(db) btree_get_time(db)
+# define MYDBM_SET_TIME(db, time) btree_set_time(db, time)
+# define MYDBM_REORG(db) /* nothing - not implemented */
+
+# else /* not GDBM or NDBM or BTREE */
+# error Define either GDBM, NDBM or BTREE before including mydbm.h
+# endif /* not GDBM or NDBM or BTREE */
+
+#define MYDBM_RESET_DSIZE(d) (MYDBM_DSIZE(d) = strlen(MYDBM_DPTR(d)) + 1)
+#define MYDBM_SET(d, value) do { MYDBM_SET_DPTR(d, value); MYDBM_RESET_DSIZE(d); } while (0)
+#define MYDBM_FREE_DPTR(d) do { free (MYDBM_DPTR (d)); MYDBM_SET_DPTR (d, NULL); } while (0)
+
+extern char *database;
+
+/* db_lookup.c */
+extern datum copy_datum (datum dat);
+
+/* db_ver.c */
+extern void dbver_wr(MYDBM_FILE dbfile);
+extern int dbver_rd(MYDBM_FILE dbfile);
+
+#endif /* MYDBM_H */