summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am58
-rw-r--r--lib/Makefile.in2323
-rw-r--r--lib/buildcmd.c654
-rw-r--r--lib/buildcmd.h144
-rwxr-xr-xlib/check-regexprops.sh43
-rw-r--r--lib/dircallback.c109
-rw-r--r--lib/dircallback.h27
-rw-r--r--lib/extendbuf.c122
-rw-r--r--lib/extendbuf.h26
-rw-r--r--lib/fdleak.c383
-rw-r--r--lib/fdleak.h22
-rw-r--r--lib/findutils-version.c59
-rw-r--r--lib/findutils-version.h27
-rw-r--r--lib/forcefindlib.c47
-rw-r--r--lib/listfile.c529
-rw-r--r--lib/listfile.h23
-rw-r--r--lib/printquoted.c80
-rw-r--r--lib/printquoted.h34
-rw-r--r--lib/qmark.c220
-rw-r--r--lib/regexprops.c614
-rw-r--r--lib/regextype.c162
-rw-r--r--lib/regextype.h56
-rw-r--r--lib/safe-atoi.c91
-rw-r--r--lib/safe-atoi.h25
-rw-r--r--lib/splitstring.c65
-rw-r--r--lib/splitstring.h40
-rw-r--r--lib/test_splitstring.c208
-rw-r--r--lib/unused-result.h39
-rw-r--r--lib/waitpid.c79
29 files changed, 6309 insertions, 0 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 0000000..5bfa8ca
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,58 @@
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.5 gnits
+# no-dependencies
+AM_CFLAGS = $(WARN_CFLAGS)
+
+noinst_LIBRARIES = libfind.a
+
+check_PROGRAMS = regexprops test_splitstring
+check_SCRIPTS = check-regexprops
+regexprops_SOURCES = regexprops.c regextype.c
+
+TESTS =
+if CROSS_COMPILING
+# The regexprops program needs to be a native executable, so we
+# can't build it with a cross-compiler.
+else
+TESTS += check-regexprops test_splitstring
+endif
+
+libfind_a_SOURCES = findutils-version.c
+EXTRA_DIST = extendbuf.h buildcmd.h \
+ findutils-version.h \
+ fdleak.h unused-result.h check-regexprops.sh
+SUFFIXES =
+MOSTLYCLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+
+AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/gl/lib
+LDADD = ../gl/lib/libgnulib.a $(LIBINTL)
+
+libfind_a_SOURCES += printquoted.h listfile.h \
+ regextype.h dircallback.h safe-atoi.h splitstring.h
+libfind_a_SOURCES += listfile.c extendbuf.c buildcmd.c \
+ forcefindlib.c qmark.c printquoted.c regextype.c dircallback.c fdleak.c \
+ safe-atoi.c splitstring.c
+
+CLEANFILES = check-regexprops
+
+# Clean coverage files generated by running binaries built with
+# gcc -fprofile-arcs -ftest-coverage
+coverage-clean:
+ $(RM) *.gcno *.gcda *.gcov *.lcov
+
+clean-local: coverage-clean
+
+EXTRA_DIST += waitpid.c forcefindlib.c
+TESTS_ENVIRONMENT = REGEXPROPS=regexprops$(EXEEXT)
+libfind_a_LIBADD = $(FINDLIBOBJS)
+libfind_a_DEPENDENCIES = $(FINDLIBOBJS)
+
+check-regexprops: check-regexprops.sh
+ cp $(srcdir)/check-regexprops.sh check-regexprops
+ chmod +x check-regexprops
+
+test_splitstring_SOURCES = test_splitstring.c splitstring.c
diff --git a/lib/Makefile.in b/lib/Makefile.in
new file mode 100644
index 0000000..6736799
--- /dev/null
+++ b/lib/Makefile.in
@@ -0,0 +1,2323 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+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@
+check_PROGRAMS = regexprops$(EXEEXT) test_splitstring$(EXEEXT)
+TESTS = $(am__EXEEXT_1)
+# The regexprops program needs to be a native executable, so we
+# can't build it with a cross-compiler.
+@CROSS_COMPILING_FALSE@am__append_1 = check-regexprops test_splitstring
+subdir = lib
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/build-aux/mkinstalldirs \
+ $(top_srcdir)/build-aux/depcomp \
+ $(top_srcdir)/build-aux/test-driver
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \
+ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \
+ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \
+ $(top_srcdir)/gl/m4/00gnulib.m4 \
+ $(top_srcdir)/gl/m4/absolute-header.m4 \
+ $(top_srcdir)/gl/m4/alloca.m4 \
+ $(top_srcdir)/gl/m4/arpa_inet_h.m4 \
+ $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \
+ $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \
+ $(top_srcdir)/gl/m4/canonicalize.m4 \
+ $(top_srcdir)/gl/m4/chdir-long.m4 \
+ $(top_srcdir)/gl/m4/check-math-lib.m4 \
+ $(top_srcdir)/gl/m4/clock_time.m4 \
+ $(top_srcdir)/gl/m4/close-stream.m4 \
+ $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \
+ $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \
+ $(top_srcdir)/gl/m4/codeset.m4 \
+ $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \
+ $(top_srcdir)/gl/m4/cycle-check.m4 \
+ $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \
+ $(top_srcdir)/gl/m4/dirent-safer.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/euidaccess.m4 \
+ $(top_srcdir)/gl/m4/exponentd.m4 \
+ $(top_srcdir)/gl/m4/exponentf.m4 \
+ $(top_srcdir)/gl/m4/exponentl.m4 \
+ $(top_srcdir)/gl/m4/extensions.m4 \
+ $(top_srcdir)/gl/m4/extern-inline.m4 \
+ $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \
+ $(top_srcdir)/gl/m4/fcntl-o.m4 \
+ $(top_srcdir)/gl/m4/fcntl-safer.m4 \
+ $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \
+ $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \
+ $(top_srcdir)/gl/m4/fflush.m4 \
+ $(top_srcdir)/gl/m4/fileblocks.m4 \
+ $(top_srcdir)/gl/m4/filemode.m4 \
+ $(top_srcdir)/gl/m4/filenamecat.m4 \
+ $(top_srcdir)/gl/m4/flexmember.m4 \
+ $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \
+ $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \
+ $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \
+ $(top_srcdir)/gl/m4/freadahead.m4 \
+ $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \
+ $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \
+ $(top_srcdir)/gl/m4/fstatat.m4 \
+ $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \
+ $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \
+ $(top_srcdir)/gl/m4/fts.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/getgroups.m4 \
+ $(top_srcdir)/gl/m4/gethostname.m4 \
+ $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \
+ $(top_srcdir)/gl/m4/getpagesize.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/gnulib-common.m4 \
+ $(top_srcdir)/gl/m4/gnulib-comp.m4 \
+ $(top_srcdir)/gl/m4/group-member.m4 \
+ $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \
+ $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \
+ $(top_srcdir)/gl/m4/include_next.m4 \
+ $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \
+ $(top_srcdir)/gl/m4/intlmacosx.m4 \
+ $(top_srcdir)/gl/m4/intmax_t.m4 \
+ $(top_srcdir)/gl/m4/inttostr.m4 \
+ $(top_srcdir)/gl/m4/inttypes-pri.m4 \
+ $(top_srcdir)/gl/m4/inttypes.m4 \
+ $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \
+ $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \
+ $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \
+ $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \
+ $(top_srcdir)/gl/m4/iswblank.m4 \
+ $(top_srcdir)/gl/m4/langinfo_h.m4 \
+ $(top_srcdir)/gl/m4/largefile.m4 \
+ $(top_srcdir)/gl/m4/lcmessage.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/libunistring-base.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-tr.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/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \
+ $(top_srcdir)/gl/m4/longlong.m4 \
+ $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \
+ $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \
+ $(top_srcdir)/gl/m4/malloca.m4 \
+ $(top_srcdir)/gl/m4/manywarnings.m4 \
+ $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \
+ $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \
+ $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \
+ $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \
+ $(top_srcdir)/gl/m4/mbstate_t.m4 \
+ $(top_srcdir)/gl/m4/mbswidth.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \
+ $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \
+ $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \
+ $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \
+ $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \
+ $(top_srcdir)/gl/m4/mountlist.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/netinet_in_h.m4 \
+ $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \
+ $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \
+ $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \
+ $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \
+ $(top_srcdir)/gl/m4/parse-datetime.m4 \
+ $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \
+ $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \
+ $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \
+ $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \
+ $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \
+ $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \
+ $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \
+ $(top_srcdir)/gl/m4/readlinkat.m4 \
+ $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \
+ $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \
+ $(top_srcdir)/gl/m4/rpmatch.m4 \
+ $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \
+ $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \
+ $(top_srcdir)/gl/m4/select.m4 \
+ $(top_srcdir)/gl/m4/selinux-context-h.m4 \
+ $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \
+ $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.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/snprintf.m4 \
+ $(top_srcdir)/gl/m4/socketlib.m4 \
+ $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \
+ $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \
+ $(top_srcdir)/gl/m4/st_dm_mode.m4 \
+ $(top_srcdir)/gl/m4/stat-size.m4 \
+ $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.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/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \
+ $(top_srcdir)/gl/m4/strcasestr.m4 \
+ $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \
+ $(top_srcdir)/gl/m4/strerror_r.m4 \
+ $(top_srcdir)/gl/m4/strftime.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/strstr.m4 $(top_srcdir)/gl/m4/strtoull.m4 \
+ $(top_srcdir)/gl/m4/strtoumax.m4 \
+ $(top_srcdir)/gl/m4/symlink.m4 \
+ $(top_srcdir)/gl/m4/symlinkat.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/sys_utsname_h.m4 \
+ $(top_srcdir)/gl/m4/sys_wait_h.m4 \
+ $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \
+ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \
+ $(top_srcdir)/gl/m4/time_rz.m4 $(top_srcdir)/gl/m4/timegm.m4 \
+ $(top_srcdir)/gl/m4/timespec.m4 \
+ $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \
+ $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \
+ $(top_srcdir)/gl/m4/unistd-safer.m4 \
+ $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \
+ $(top_srcdir)/gl/m4/unlinkat.m4 \
+ $(top_srcdir)/gl/m4/unlinkdir.m4 \
+ $(top_srcdir)/gl/m4/vasnprintf.m4 \
+ $(top_srcdir)/gl/m4/version-etc.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/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \
+ $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.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/xstrtod.m4 \
+ $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \
+ $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libfind_a_AR = $(AR) $(ARFLAGS)
+am__DEPENDENCIES_1 =
+am_libfind_a_OBJECTS = findutils-version.$(OBJEXT) listfile.$(OBJEXT) \
+ extendbuf.$(OBJEXT) buildcmd.$(OBJEXT) forcefindlib.$(OBJEXT) \
+ qmark.$(OBJEXT) printquoted.$(OBJEXT) regextype.$(OBJEXT) \
+ dircallback.$(OBJEXT) fdleak.$(OBJEXT) safe-atoi.$(OBJEXT) \
+ splitstring.$(OBJEXT)
+libfind_a_OBJECTS = $(am_libfind_a_OBJECTS)
+am_regexprops_OBJECTS = regexprops.$(OBJEXT) regextype.$(OBJEXT)
+regexprops_OBJECTS = $(am_regexprops_OBJECTS)
+regexprops_LDADD = $(LDADD)
+regexprops_DEPENDENCIES = ../gl/lib/libgnulib.a $(am__DEPENDENCIES_1)
+am_test_splitstring_OBJECTS = test_splitstring.$(OBJEXT) \
+ splitstring.$(OBJEXT)
+test_splitstring_OBJECTS = $(am_test_splitstring_OBJECTS)
+test_splitstring_LDADD = $(LDADD)
+test_splitstring_DEPENDENCIES = ../gl/lib/libgnulib.a \
+ $(am__DEPENDENCIES_1)
+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__depfiles_maybe = depfiles
+am__mv = mv -f
+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 = $(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 = $(libfind_a_SOURCES) $(regexprops_SOURCES) \
+ $(test_splitstring_SOURCES)
+DIST_SOURCES = $(libfind_a_SOURCES) $(regexprops_SOURCES) \
+ $(test_splitstring_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+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__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+@CROSS_COMPILING_FALSE@am__EXEEXT_1 = check-regexprops \
+@CROSS_COMPILING_FALSE@ test_splitstring$(EXEEXT)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkglibexecdir = @pkglibexecdir@
+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@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AUXDIR = @AUXDIR@
+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@
+BYTESWAP_H = @BYTESWAP_H@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_ARG_SIZE = @DEFAULT_ARG_SIZE@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+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@
+FAKETIME = @FAKETIME@
+FINDLIBOBJS = @FINDLIBOBJS@
+FINDLIBS = @FINDLIBS@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+GETHOSTNAME_LIB = @GETHOSTNAME_LIB@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACCEPT = @GNULIB_ACCEPT@
+GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
+GNULIB_ACOSF = @GNULIB_ACOSF@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
+GNULIB_ATANL = @GNULIB_ATANL@
+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_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_CONNECT = @GNULIB_CONNECT@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
+GNULIB_COSL = @GNULIB_COSL@
+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_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
+GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
+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_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
+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_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+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_GETPEERNAME = @GNULIB_GETPEERNAME@
+GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
+GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
+GNULIB_INET_PTON = @GNULIB_INET_PTON@
+GNULIB_IOCTL = @GNULIB_IOCTL@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
+GNULIB_ISFINITE = @GNULIB_ISFINITE@
+GNULIB_ISINF = @GNULIB_ISINF@
+GNULIB_ISNAN = @GNULIB_ISNAN@
+GNULIB_ISNAND = @GNULIB_ISNAND@
+GNULIB_ISNANF = @GNULIB_ISNANF@
+GNULIB_ISNANL = @GNULIB_ISNANL@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
+GNULIB_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LISTEN = @GNULIB_LISTEN@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
+GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
+GNULIB_LOGL = @GNULIB_LOGL@
+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_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
+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_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_POWF = @GNULIB_POWF@
+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_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_RECV = @GNULIB_RECV@
+GNULIB_RECVFROM = @GNULIB_RECVFROM@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_ROUND = @GNULIB_ROUND@
+GNULIB_ROUNDF = @GNULIB_ROUNDF@
+GNULIB_ROUNDL = @GNULIB_ROUNDL@
+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_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SOCKET = @GNULIB_SOCKET@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+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_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_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
+GNULIB_TANL = @GNULIB_TANL@
+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_TRUNC = @GNULIB_TRUNC@
+GNULIB_TRUNCF = @GNULIB_TRUNCF@
+GNULIB_TRUNCL = @GNULIB_TRUNCL@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_UNAME = @GNULIB_UNAME@
+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_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_WAITPID = @GNULIB_WAITPID@
+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_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_ACOSF = @HAVE_ACOSF@
+HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
+HAVE_ASINF = @HAVE_ASINF@
+HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
+HAVE_ATANL = @HAVE_ATANL@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
+HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
+HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
+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_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@
+HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@
+HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
+HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
+HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
+HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_SINL = @HAVE_DECL_SINL@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
+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_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TANL = @HAVE_DECL_TANL@
+HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
+HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
+HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
+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_EXPF = @HAVE_EXPF@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
+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_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
+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_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
+HAVE_ISNAND = @HAVE_ISNAND@
+HAVE_ISNANF = @HAVE_ISNANF@
+HAVE_ISNANL = @HAVE_ISNANL@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+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_LDEXPF = @HAVE_LDEXPF@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
+HAVE_LOGL = @HAVE_LOGL@
+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_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
+HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+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_POWF = @HAVE_POWF@
+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_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_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+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_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
+HAVE_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_SQRTF = @HAVE_SQRTF@
+HAVE_SQRTL = @HAVE_SQRTL@
+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_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_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_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@
+HAVE_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_UNAME = @HAVE_UNAME@
+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_UTIMENSAT = @HAVE_UTIMENSAT@
+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_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@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INET_PTON_LIB = @INET_PTON_LIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+ISFINITE_LIBM = @ISFINITE_LIBM@
+ISINF_LIBM = @ISINF_LIBM@
+LDFLAGS = @LDFLAGS@
+LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@
+LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
+LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
+LIBS = @LIBS@
+LIBSOCKET = @LIBSOCKET@
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
+LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
+LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_EACCESS = @LIB_EACCESS@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_SELECT = @LIB_SELECT@
+LIB_SELINUX = @LIB_SELINUX@
+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_TR_UTF8 = @LOCALE_TR_UTF8@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
+LTLIBOBJS = @LTLIBOBJS@
+LTLIBPTH = @LTLIBPTH@
+LTLIBTHREAD = @LTLIBTHREAD@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MODF_LIBM = @MODF_LIBM@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NETINET_IN_H = @NETINET_IN_H@
+NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
+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_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
+NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_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_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_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_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
+NEXT_MATH_H = @NEXT_MATH_H@
+NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_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_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@
+NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+OBJEXT = @OBJEXT@
+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@
+POSUB = @POSUB@
+PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
+REPLACE_CEIL = @REPLACE_CEIL@
+REPLACE_CEILF = @REPLACE_CEILF@
+REPLACE_CEILL = @REPLACE_CEILL@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
+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_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
+REPLACE_FREXPL = @REPLACE_FREXPL@
+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_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
+REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_IOCTL = @REPLACE_IOCTL@
+REPLACE_ISATTY = @REPLACE_ISATTY@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
+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_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
+REPLACE_NAN = @REPLACE_NAN@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+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_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+REPLACE_SELECT = @REPLACE_SELECT@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
+REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
+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_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
+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_TRUNC = @REPLACE_TRUNC@
+REPLACE_TRUNCF = @REPLACE_TRUNCF@
+REPLACE_TRUNCL = @REPLACE_TRUNCL@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+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_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@
+SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+SORT = @SORT@
+SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@
+STDALIGN_H = @STDALIGN_H@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+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@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TRUNC_LIBM = @TRUNC_LIBM@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
+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@
+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@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+YIELD_LIB = @YIELD_LIB@
+abs_aux_dir = @abs_aux_dir@
+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_RANLIB = @ac_ct_RANLIB@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
+gltests_WITNESS = @gltests_WITNESS@
+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@
+lispdir = @lispdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.5 gnits
+# no-dependencies
+AM_CFLAGS = $(WARN_CFLAGS)
+noinst_LIBRARIES = libfind.a
+check_SCRIPTS = check-regexprops
+regexprops_SOURCES = regexprops.c regextype.c
+libfind_a_SOURCES = findutils-version.c printquoted.h listfile.h \
+ regextype.h dircallback.h safe-atoi.h splitstring.h listfile.c \
+ extendbuf.c buildcmd.c forcefindlib.c qmark.c printquoted.c \
+ regextype.c dircallback.c fdleak.c safe-atoi.c splitstring.c
+EXTRA_DIST = extendbuf.h buildcmd.h findutils-version.h fdleak.h \
+ unused-result.h check-regexprops.sh waitpid.c forcefindlib.c
+SUFFIXES =
+MOSTLYCLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/gl/lib
+LDADD = ../gl/lib/libgnulib.a $(LIBINTL)
+CLEANFILES = check-regexprops
+TESTS_ENVIRONMENT = REGEXPROPS=regexprops$(EXEEXT)
+libfind_a_LIBADD = $(FINDLIBOBJS)
+libfind_a_DEPENDENCIES = $(FINDLIBOBJS)
+test_splitstring_SOURCES = test_splitstring.c splitstring.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(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) --gnits lib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits lib/Makefile
+.PRECIOUS: 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__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+libfind.a: $(libfind_a_OBJECTS) $(libfind_a_DEPENDENCIES) $(EXTRA_libfind_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libfind.a
+ $(AM_V_AR)$(libfind_a_AR) libfind.a $(libfind_a_OBJECTS) $(libfind_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libfind.a
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+regexprops$(EXEEXT): $(regexprops_OBJECTS) $(regexprops_DEPENDENCIES) $(EXTRA_regexprops_DEPENDENCIES)
+ @rm -f regexprops$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(regexprops_OBJECTS) $(regexprops_LDADD) $(LIBS)
+
+test_splitstring$(EXEEXT): $(test_splitstring_OBJECTS) $(test_splitstring_DEPENDENCIES) $(EXTRA_test_splitstring_DEPENDENCIES)
+ @rm -f test_splitstring$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_splitstring_OBJECTS) $(test_splitstring_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildcmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dircallback.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extendbuf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdleak.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findutils-version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/forcefindlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listfile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printquoted.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmark.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexprops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regextype.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-atoi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splitstring.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_splitstring.Po@am__quote@
+
+.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) '$<'`
+
+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
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS) $(check_SCRIPTS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+check-regexprops.log: check-regexprops
+ @p='check-regexprops'; \
+ b='check-regexprops'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_splitstring.log: test_splitstring$(EXEEXT)
+ @p='test_splitstring$(EXEEXT)'; \
+ b='test_splitstring'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(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
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+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:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+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)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-local \
+ clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -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-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 -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-local \
+ clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic 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-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \
+ uninstall uninstall-am
+
+
+# Clean coverage files generated by running binaries built with
+# gcc -fprofile-arcs -ftest-coverage
+coverage-clean:
+ $(RM) *.gcno *.gcda *.gcov *.lcov
+
+clean-local: coverage-clean
+
+check-regexprops: check-regexprops.sh
+ cp $(srcdir)/check-regexprops.sh check-regexprops
+ chmod +x check-regexprops
+
+# 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/lib/buildcmd.c b/lib/buildcmd.c
new file mode 100644
index 0000000..a58f67e
--- /dev/null
+++ b/lib/buildcmd.c
@@ -0,0 +1,654 @@
+/* buildcmd.c -- build command lines from a list of arguments.
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2005, 2006,
+ 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <assert.h>
+#include <errno.h>
+#include <error.h>
+#include <limits.h>
+#include <locale.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#ifndef _POSIX_SOURCE
+# include <sys/param.h>
+#endif
+#include <unistd.h>
+#include <wchar.h>
+#include <xalloc.h>
+
+/* gnulib headers. */
+#include "gettext.h"
+#include "xstrtol.h"
+
+/* find headers. */
+#include "buildcmd.h"
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#define textdomain(Domain)
+#define bindtextdomain(Package, Directory)
+#endif
+#ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+#else
+/* See locate.c for explanation as to why not use (String) */
+# define N_(String) String
+#endif
+
+/* COMPAT: SYSV version defaults size (and has a max value of) to 470.
+ We try to make it as large as possible. See bc_get_arg_max() below. */
+#if defined NCARGS && !defined ARG_MAX
+/* We include sys/param.h in order to detect this case. */
+#error "You have an unusual system. Once you remove this error message from buildcmd.c, it should work, but please make sure that DejaGnu is installed on your system and that 'make check' passes before using the findutils programs. Please mail bug-findutils@gnu.org to tell us about your system."
+#define ARG_MAX NCARGS
+#endif
+
+
+static const char *special_terminating_arg = "do_not_care";
+
+
+
+/* Add a terminator to the argument list. */
+static void
+bc_args_complete (struct buildcmd_control *ctl,
+ struct buildcmd_state *state)
+{
+ bc_push_arg (ctl, state, special_terminating_arg, 0, NULL, 0, 0);
+}
+
+
+/* Replace all instances of `replace_pat' in ARG with `linebuf',
+ and add the resulting string to the list of arguments for the command
+ to execute.
+ ARGLEN is the length of ARG, not including the null.
+ LBLEN is the length of LINEBUF, not including the null.
+ PFXLEN is the length of PREFIX. Substitution is not performed on
+ the prefix. The prefix is used if the argument contains replace_pat.
+
+ COMPAT: insertions on the SYSV version are limited to 255 chars per line,
+ and a max of 5 occurrences of replace_pat in the initial-arguments.
+ Those restrictions do not exist here. */
+
+void
+bc_do_insert (struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ char *arg, size_t arglen,
+ const char *prefix, size_t pfxlen,
+ const char *linebuf, size_t lblen,
+ int initial_args)
+{
+ /* Temporary copy of each arg with the replace pattern replaced by the
+ real arg. */
+ static char *insertbuf;
+ char *p;
+ size_t bytes_left = ctl->arg_max - 1; /* Bytes left on the command line. */
+
+ /* XXX: on systems lacking an upper limit for exec args, ctl->arg_max
+ * may have been set to LONG_MAX (see bc_get_arg_max()). Hence
+ * this xmalloc call may be a bad idea, especially since we are
+ * adding 1 to it...
+ */
+ if (!insertbuf)
+ insertbuf = xmalloc (ctl->arg_max + 1);
+ p = insertbuf;
+
+ do
+ {
+ size_t len; /* Length in ARG before `replace_pat'. */
+ char *s = mbsstr (arg, ctl->replace_pat);
+ if (s)
+ {
+ len = s - arg;
+ }
+ else
+ {
+ len = arglen;
+ }
+
+ if (bytes_left <= len)
+ break;
+ else
+ bytes_left -= len;
+
+ strncpy (p, arg, len);
+ p += len;
+ arg += len;
+ arglen -= len;
+
+ if (s)
+ {
+ if (bytes_left <= (lblen + pfxlen))
+ break;
+ else
+ bytes_left -= (lblen + pfxlen);
+
+ if (prefix)
+ {
+ strcpy (p, prefix);
+ p += pfxlen;
+ }
+ strcpy (p, linebuf);
+ p += lblen;
+
+ arg += ctl->rplen;
+ arglen -= ctl->rplen;
+ }
+ }
+ while (*arg);
+ if (*arg)
+ error (EXIT_FAILURE, 0, _("command too long"));
+ *p++ = '\0';
+
+ bc_push_arg (ctl, state,
+ insertbuf, p - insertbuf,
+ NULL, 0,
+ initial_args);
+}
+
+
+/* Update our best guess as to how many arguments we should pass to the next
+ * invocation of the command.
+ */
+static size_t
+update_limit (struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ bool success,
+ size_t limit)
+{
+ if (success)
+ {
+ if (limit > state->largest_successful_arg_count)
+ state->largest_successful_arg_count = limit;
+ }
+ else
+ {
+ if (limit < state->smallest_failed_arg_count
+ || (0 == state->smallest_failed_arg_count))
+ state->smallest_failed_arg_count = limit;
+ }
+
+ if (0 == (state->largest_successful_arg_count)
+ || (state->smallest_failed_arg_count <= state->largest_successful_arg_count))
+ {
+ /* No success yet, or running on a system which has
+ limits on total argv length, but not arg count. */
+ if (success)
+ {
+ if (limit < SIZE_MAX)
+ ++limit;
+ }
+ else
+ {
+ limit /= 2;
+ }
+ }
+ else /* We can use bisection. */
+ {
+ const size_t shift = (state->smallest_failed_arg_count
+ - state->largest_successful_arg_count) / 2;
+ if (success)
+ {
+ if (shift)
+ limit += shift;
+ else
+ ++limit;
+ }
+ else
+ {
+ if (shift)
+ limit -= shift;
+ else
+ --limit;
+ }
+ }
+
+ /* Make sure the returned value is such that progress is
+ * actually possible.
+ */
+ if (ctl->initial_argc && (limit <= ctl->initial_argc + 1u))
+ limit = ctl->initial_argc + 1u;
+ if (0 == limit)
+ limit = 1u;
+
+ return limit;
+}
+
+
+/* Copy some of the program arguments into an argv list. Copy all the
+ * initial arguments, plus up to LIMIT additional arguments.
+ */
+static size_t
+copy_args (struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ char** working_args, size_t limit, size_t done)
+{
+ size_t dst_pos = 0;
+ size_t src_pos = 0;
+
+ while (src_pos < ctl->initial_argc)
+ {
+ working_args[dst_pos++] = state->cmd_argv[src_pos++];
+ }
+ src_pos += done;
+ while (src_pos < state->cmd_argc && dst_pos < limit)
+ {
+ working_args[dst_pos++] = state->cmd_argv[src_pos++];
+ }
+ assert (dst_pos >= ctl->initial_argc);
+ working_args[dst_pos] = NULL;
+ return dst_pos;
+}
+
+
+
+
+/* Execute the program with the currently-built list of arguments. */
+void
+bc_do_exec (struct buildcmd_control *ctl,
+ struct buildcmd_state *state)
+{
+ char** working_args;
+ size_t limit, done;
+
+ /* Terminate the args. */
+ bc_args_complete (ctl, state);
+ /* Verify that the argument list is terminated. */
+ assert (state->cmd_argc > 0);
+ assert (state->cmd_argv[state->cmd_argc-1] == NULL);
+
+ working_args = xmalloc ((1+state->cmd_argc) * sizeof (char*));
+ done = 0;
+ limit = state->cmd_argc;
+
+ do
+ {
+ const size_t dst_pos = copy_args (ctl, state, working_args,
+ limit, done);
+ if (ctl->exec_callback (ctl, state->usercontext, dst_pos, working_args))
+ {
+ limit = update_limit (ctl, state, true, limit);
+ done += (dst_pos - ctl->initial_argc);
+ }
+ else /* got E2BIG, adjust arguments */
+ {
+ if (limit <= ctl->initial_argc + 1)
+ {
+ /* No room to reduce the length of the argument list.
+ Issue an error message and give up. */
+ error (EXIT_FAILURE, 0,
+ _("can't call exec() due to argument size restrictions"));
+ }
+ else
+ {
+ /* Try fewer arguments. */
+ limit = update_limit (ctl, state, false, limit);
+ }
+ }
+ }
+ while ((done + 1) < (state->cmd_argc - ctl->initial_argc));
+ /* (state->cmd_argc - ctl->initial_argc) includes the terminating NULL,
+ * which is why we add 1 to done in the test above. */
+
+ free (working_args);
+ bc_clear_args (ctl, state);
+}
+
+
+/* Return nonzero if there would not be enough room for an additional
+ * argument. We check the total number of arguments only, not the space
+ * occupied by those arguments.
+ *
+ * If we return zero, there still may not be enough room for the next
+ * argument, depending on its length.
+ */
+static int
+bc_argc_limit_reached (int initial_args,
+ const struct buildcmd_control *ctl,
+ struct buildcmd_state *state)
+{
+ /* Check to see if we about to exceed a limit set by xargs' -n option */
+ if (!initial_args && ctl->args_per_exec &&
+ ( (state->cmd_argc - ctl->initial_argc) == ctl->args_per_exec))
+ return 1;
+
+ /* We deliberately use an equality test here rather than >= in order
+ * to force a software failure if the code is modified in such a way
+ * that it fails to call this function for every new argument.
+ */
+ return state->cmd_argc == ctl->max_arg_count;
+}
+
+
+/* Add ARG to the end of the list of arguments `cmd_argv' to pass
+ to the command.
+ LEN is the length of ARG, including the terminating null.
+ If this brings the list up to its maximum size, execute the command.
+*/
+void
+bc_push_arg (struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ const char *arg, size_t len,
+ const char *prefix, size_t pfxlen,
+ int initial_args)
+{
+ const int terminate = (arg == special_terminating_arg);
+
+ assert (arg != NULL);
+
+ if (!initial_args)
+ {
+ state->todo = 1;
+ }
+
+ if (!terminate)
+ {
+ if (state->cmd_argv_chars + len + pfxlen > ctl->arg_max)
+ {
+ if (initial_args || state->cmd_argc == ctl->initial_argc)
+ error (EXIT_FAILURE, 0,
+ _("cannot fit single argument within argument list size limit"));
+
+ /* xargs option -i (replace_pat) implies -x (exit_if_size_exceeded) */
+ if (ctl->replace_pat
+ || (ctl->exit_if_size_exceeded &&
+ (ctl->lines_per_exec || ctl->args_per_exec)))
+ error (EXIT_FAILURE, 0, _("argument list too long"));
+ bc_do_exec (ctl, state);
+ }
+ if (bc_argc_limit_reached (initial_args, ctl, state))
+ bc_do_exec (ctl, state);
+ }
+
+ if (state->cmd_argc >= state->cmd_argv_alloc)
+ {
+ /* XXX: we could use extendbuf() here. */
+ if (!state->cmd_argv)
+ {
+ state->cmd_argv_alloc = 64;
+ state->cmd_argv = xmalloc (sizeof (char *) * state->cmd_argv_alloc);
+ }
+ else
+ {
+ state->cmd_argv_alloc *= 2;
+ state->cmd_argv = xrealloc (state->cmd_argv,
+ sizeof (char *) * state->cmd_argv_alloc);
+ }
+ }
+
+ if (terminate)
+ state->cmd_argv[state->cmd_argc++] = NULL;
+ else
+ {
+ state->cmd_argv[state->cmd_argc++] = state->argbuf + state->cmd_argv_chars;
+ if (prefix)
+ {
+ strcpy (state->argbuf + state->cmd_argv_chars, prefix);
+ state->cmd_argv_chars += pfxlen;
+ }
+
+ strcpy (state->argbuf + state->cmd_argv_chars, arg);
+ state->cmd_argv_chars += len;
+
+ /* If we have now collected enough arguments,
+ * do the exec immediately.
+ */
+ if (bc_argc_limit_reached (initial_args, ctl, state))
+ {
+ bc_do_exec (ctl, state);
+ }
+ }
+
+ /* If this is an initial argument, set the high-water mark. */
+ if (initial_args)
+ {
+ state->cmd_initial_argv_chars = state->cmd_argv_chars;
+ }
+}
+
+
+size_t
+bc_get_arg_max (void)
+{
+ long val;
+
+ /* We may resort to using LONG_MAX, so check it fits. */
+ /* XXX: better to do a compile-time check */
+ assert ( (~(size_t)0) >= LONG_MAX);
+
+#ifdef _SC_ARG_MAX
+ val = sysconf (_SC_ARG_MAX);
+#else
+ val = -1;
+#endif
+
+ if (val > 0)
+ return val;
+
+ /* either _SC_ARG_MAX was not available or
+ * there is no particular limit.
+ */
+#ifdef ARG_MAX
+ val = ARG_MAX;
+ if (val > 0)
+ return val;
+#endif
+
+ /* The value returned by this function bounds the
+ * value applied as the ceiling for the -s option.
+ * Hence it the system won't tell us what its limit
+ * is, we allow the user to specify more or less
+ * whatever value they like.
+ */
+ return LONG_MAX;
+}
+
+
+static int
+cb_exec_noop (struct buildcmd_control * ctl,
+ void *usercontext,
+ int argc,
+ char **argv)
+{
+ /* does nothing. */
+ (void) ctl;
+ (void) usercontext;
+ (void) argc;
+ (void) argv;
+
+ return 0;
+}
+
+
+/* Return how much of ARG_MAX is used by the environment. */
+size_t
+bc_size_of_environment (void)
+{
+ size_t len = 0u;
+ char **envp = environ;
+
+ while (*envp)
+ len += strlen (*envp++) + 1;
+
+ return len;
+}
+
+
+enum BC_INIT_STATUS
+bc_init_controlinfo (struct buildcmd_control *ctl,
+ size_t headroom)
+{
+ size_t size_of_environment = bc_size_of_environment ();
+
+ /* POSIX requires that _POSIX_ARG_MAX is 4096. That is the lowest
+ * possible value for ARG_MAX on a POSIX compliant system. See
+ * http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html
+ */
+ ctl->posix_arg_size_min = _POSIX_ARG_MAX;
+ ctl->posix_arg_size_max = bc_get_arg_max ();
+
+ ctl->exit_if_size_exceeded = 0;
+
+ /* Take the size of the environment into account. */
+ if (size_of_environment > ctl->posix_arg_size_max)
+ {
+ return BC_INIT_ENV_TOO_BIG;
+ }
+ else if ((headroom + size_of_environment) >= ctl->posix_arg_size_max)
+ {
+ /* POSIX.2 requires xargs to subtract 2048, but ARG_MAX is
+ * guaranteed to be at least 4096. Although xargs could use an
+ * assertion here, we use a runtime check which returns an error
+ * code, because our caller may not be xargs.
+ */
+ return BC_INIT_CANNOT_ACCOMODATE_HEADROOM;
+ }
+ else
+ {
+ ctl->posix_arg_size_max -= size_of_environment;
+ ctl->posix_arg_size_max -= headroom;
+ }
+
+ /* need to subtract 2 on the following line - for Linux/PPC */
+ ctl->max_arg_count = (ctl->posix_arg_size_max / sizeof (char*)) - 2u;
+ assert (ctl->max_arg_count > 0);
+ ctl->rplen = 0u;
+ ctl->replace_pat = NULL;
+ ctl->initial_argc = 0;
+ ctl->exec_callback = cb_exec_noop;
+ ctl->lines_per_exec = 0;
+ ctl->args_per_exec = 0;
+
+ /* Set the initial value of arg_max to the largest value we can
+ * tolerate.
+ */
+ ctl->arg_max = ctl->posix_arg_size_max;
+
+ return BC_INIT_OK;
+}
+
+void
+bc_use_sensible_arg_max (struct buildcmd_control *ctl)
+{
+#ifdef DEFAULT_ARG_SIZE
+ enum { arg_size = DEFAULT_ARG_SIZE };
+#else
+ enum { arg_size = (128u * 1024u) };
+#endif
+
+ /* Check against the upper and lower limits. */
+ if (arg_size > ctl->posix_arg_size_max)
+ ctl->arg_max = ctl->posix_arg_size_max;
+ else if (arg_size < ctl->posix_arg_size_min)
+ ctl->arg_max = ctl->posix_arg_size_min;
+ else
+ ctl->arg_max = arg_size;
+}
+
+
+
+
+void
+bc_init_state (const struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ void *context)
+{
+ state->cmd_argc = 0;
+ state->cmd_argv_chars = 0;
+ state->cmd_argv = NULL;
+ state->cmd_argv_alloc = 0;
+ state->largest_successful_arg_count = 0;
+ state->smallest_failed_arg_count = 0;
+
+ /* XXX: the following memory allocation is inadvisable on systems
+ * with no ARG_MAX, because ctl->arg_max may actually be close to
+ * LONG_MAX. Adding one to it is safe though because earlier we
+ * subtracted 2048.
+ */
+ assert (ctl->arg_max <= (LONG_MAX - 2048L));
+ state->argbuf = xmalloc (ctl->arg_max + 1u);
+
+ state->cmd_argv_chars = state->cmd_initial_argv_chars = 0;
+ state->todo = 0;
+ state->dir_fd = -1;
+ state->usercontext = context;
+}
+
+void
+bc_clear_args (const struct buildcmd_control *ctl,
+ struct buildcmd_state *state)
+{
+ state->cmd_argc = ctl->initial_argc;
+ state->cmd_argv_chars = state->cmd_initial_argv_chars;
+ state->todo = 0;
+ state->dir_fd = -1;
+}
+
+
+/* Return nonzero if the value stored in the environment variable ENV_VAR_NAME
+ * exceeds QUANTITY.
+ */
+static int
+exceeds (const char *env_var_name, size_t quantity)
+{
+ const char *val = getenv (env_var_name);
+ if (val)
+ {
+ char *tmp;
+ unsigned long limit;
+
+ if (xstrtoul (val, &tmp, 10, &limit, NULL) == LONGINT_OK)
+ {
+ if (quantity > limit)
+ return 1;
+ }
+ else
+ {
+ error (EXIT_FAILURE, errno,
+ _("Environment variable %s is not set to a "
+ "valid decimal number"),
+ env_var_name);
+ return 0;
+ }
+ }
+ return 0;
+}
+
+/* Return nonzero if the indicated argument list exceeds a testing limit.
+ * NOTE: argv could be declared 'const char *const *argv', but it works as
+ * expected only with C++ compilers <http://c-faq.com/ansi/constmismatch.html>.
+ */
+bool
+bc_args_exceed_testing_limit (char **argv)
+{
+ size_t chars, args;
+
+ for (chars=args=0; *argv; ++argv)
+ {
+ ++args;
+ chars += strlen(*argv);
+ }
+
+ return (exceeds ("__GNU_FINDUTILS_EXEC_ARG_COUNT_LIMIT", args) ||
+ exceeds ("__GNU_FINDUTILS_EXEC_ARG_LENGTH_LIMIT", chars));
+}
diff --git a/lib/buildcmd.h b/lib/buildcmd.h
new file mode 100644
index 0000000..f32aeec
--- /dev/null
+++ b/lib/buildcmd.h
@@ -0,0 +1,144 @@
+/* buildcmd.[ch] -- build command lines from a stream of arguments
+ Copyright (C) 2005, 2008, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/*
+ * Written by James Youngman.
+ */
+#ifndef INC_BUILDCMD_H
+#define INC_BUILDCMD_H 1
+
+#include <stdbool.h>
+
+struct buildcmd_state
+{
+ /* Number of valid elements in `cmd_argv', including terminating NULL. */
+ size_t cmd_argc; /* 0 */
+
+ /* The list of args being built. */
+ char **cmd_argv; /* NULL */
+
+ /* Number of elements allocated for `cmd_argv'. */
+ size_t cmd_argv_alloc;
+
+ /* Storage for elements of `cmd_argv'. */
+ char *argbuf;
+
+ /* Number of chars being used in `cmd_argv'. */
+ size_t cmd_argv_chars;
+
+ /* Number of chars being used in `cmd_argv' for the initial args.. */
+ size_t cmd_initial_argv_chars;
+
+ /* User context information. */
+ void *usercontext;
+
+ /* to-do flag. */
+ int todo;
+
+ /* Directory in which to perform the exec. */
+ int dir_fd;
+
+ /* Summary of what we think the argv limits are. */
+ size_t largest_successful_arg_count;
+ size_t smallest_failed_arg_count;
+};
+
+struct buildcmd_control
+{
+ /* If true, exit if lines_per_exec or args_per_exec is exceeded. */
+ int exit_if_size_exceeded; /* false */
+
+ /* POSIX limits on the argument length. */
+ size_t posix_arg_size_max;
+ size_t posix_arg_size_min;
+
+ /* The maximum number of characters that can be used per command line. */
+ size_t arg_max;
+
+ /* max_arg_count: the maximum number of arguments that can be used.
+ *
+ * Many systems include the size of the pointers in ARG_MAX.
+ * Linux on PPC fails if we just subtract 1 here.
+ *
+ * However, not all systems define ARG_MAX. Our bc_get_arg_max()
+ * function returns a useful value even if ARG_MAX is not defined.
+ * However, sometimes, max_arg_count is LONG_MAX!
+ */
+ size_t max_arg_count;
+
+
+ /* The length of `replace_pat'. */
+ size_t rplen;
+
+ /* If nonzero, then instead of putting the args from stdin at
+ the end of the command argument list, they are each stuck into the
+ initial args, replacing each occurrence of the `replace_pat' in the
+ initial args. */
+ const char *replace_pat;
+
+ /* Number of initial arguments given on the command line. */
+ size_t initial_argc; /* 0 */
+
+ /* exec callback. */
+ int (*exec_callback)(struct buildcmd_control *, void *usercontext, int argc, char **argv);
+
+ /* If nonzero, the maximum number of nonblank lines from stdin to use
+ per command line. */
+ unsigned long lines_per_exec; /* 0 */
+
+ /* The maximum number of arguments to use per command line. */
+ size_t args_per_exec;
+};
+
+enum BC_INIT_STATUS
+ {
+ BC_INIT_OK = 0,
+ BC_INIT_ENV_TOO_BIG,
+ BC_INIT_CANNOT_ACCOMODATE_HEADROOM
+ };
+
+extern size_t bc_size_of_environment (void);
+
+
+extern void bc_do_insert (struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ char *arg, size_t arglen,
+ const char *prefix, size_t pfxlen,
+ const char *linebuf, size_t lblen,
+ int initial_args);
+
+extern void bc_do_exec (struct buildcmd_control *ctl,
+ struct buildcmd_state *state);
+
+extern void bc_push_arg (struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ const char *arg, size_t len,
+ const char *prefix, size_t pfxlen,
+ int initial_args);
+
+extern void bc_init_state(const struct buildcmd_control *ctl,
+ struct buildcmd_state *state,
+ void *usercontext);
+extern enum BC_INIT_STATUS bc_init_controlinfo(struct buildcmd_control *ctl,
+ size_t arglen_headroom);
+extern size_t bc_get_arg_max(void);
+extern void bc_use_sensible_arg_max(struct buildcmd_control *ctl);
+extern void bc_clear_args(const struct buildcmd_control *ctl,
+ struct buildcmd_state *state);
+bool bc_args_exceed_testing_limit(char **argv);
+
+
+#endif
diff --git a/lib/check-regexprops.sh b/lib/check-regexprops.sh
new file mode 100755
index 0000000..805c151
--- /dev/null
+++ b/lib/check-regexprops.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Generate regexprops.texi and compare it against the checked-in version.
+#
+# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+existing=${srcdir}/../doc/regexprops.texi
+
+case ${REGEXPROPS} in
+ /*) ;;
+ *) REGEXPROPS="./${REGEXPROPS}"
+esac
+
+save_output="regexprops.texi.new"
+
+rv=1
+if output_file=`mktemp ${TMPDIR:-/tmp}/check-regexprops.XXXXXX`
+then
+ ${REGEXPROPS} "Regular Expressions" findutils |
+ sed -e 's/[ ][ ]*$//' >| "${output_file}"
+ if cmp "${existing}" "${output_file}" ; then
+ echo "${existing} is up to date."
+ rv=0
+ else
+ echo "${existing} is out of date." >&2
+ cp "${output_file}" "${save_output}" &&
+ echo "Updated output is saved in ${save_output}" >&2
+ rv=1
+ fi
+ rm -f "${output_file}"
+fi
+exit "$rv"
diff --git a/lib/dircallback.c b/lib/dircallback.c
new file mode 100644
index 0000000..c982a0a
--- /dev/null
+++ b/lib/dircallback.c
@@ -0,0 +1,109 @@
+/* listfile.c -- run a function in a specific directory
+ Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+ Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* This file was written by James Youngman, based on gnulib'c at-func.c.
+ */
+
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <errno.h>
+#include <locale.h>
+#include <stdarg.h>
+#include <sys/stat.h>
+
+/* gnulib headers. */
+#include "fcntl--.h"
+#include "openat.h"
+#include "save-cwd.h"
+
+/* find headers. */
+#include "dircallback.h"
+
+int
+run_in_dir (const struct saved_cwd *there,
+ int (*callback)(void*), void *usercontext)
+{
+ int err = -1;
+ int saved_errno = 0;
+ struct saved_cwd here;
+ if (0 == save_cwd (&here))
+ {
+ if (0 == restore_cwd (there))
+ {
+ err = callback(usercontext);
+ saved_errno = (err < 0 ? errno : 0);
+ }
+ else
+ {
+ openat_restore_fail (errno);
+ }
+
+ if (restore_cwd (&here) != 0)
+ openat_restore_fail (errno);
+
+ free_cwd (&here);
+ }
+ else
+ {
+ openat_save_fail (errno);
+ }
+ if (saved_errno)
+ errno = saved_errno;
+ return err;
+}
+
+
+int
+run_in_dirfd (int dir_fd, int (*callback)(void*), void *usercontext)
+{
+ if (dir_fd == AT_FDCWD)
+ {
+ return (*callback)(usercontext);
+ }
+ else
+ {
+ struct saved_cwd saved_cwd;
+ int saved_errno;
+ int err;
+
+ if (save_cwd (&saved_cwd) != 0)
+ openat_save_fail (errno);
+
+ if (fchdir (dir_fd) != 0)
+ {
+ saved_errno = errno;
+ free_cwd (&saved_cwd);
+ errno = saved_errno;
+ return -1;
+ }
+
+ err = (*callback)(usercontext);
+ saved_errno = (err < 0 ? errno : 0);
+
+ if (restore_cwd (&saved_cwd) != 0)
+ openat_restore_fail (errno);
+
+ free_cwd (&saved_cwd);
+
+ if (saved_errno)
+ errno = saved_errno;
+ return err;
+ }
+}
diff --git a/lib/dircallback.h b/lib/dircallback.h
new file mode 100644
index 0000000..1447a04
--- /dev/null
+++ b/lib/dircallback.h
@@ -0,0 +1,27 @@
+/* listfile.h -- display a long listing of a file
+ Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#if !defined DIRCALLBACK_H
+# define DIRCALLBACK_H
+
+struct saved_cwd;
+
+int run_in_dirfd (int fd, int (*callback)(void*), void *usercontext);
+int run_in_dir (const struct saved_cwd*, int (*callback)(void*), void *usercontext);
+
+#endif
diff --git a/lib/extendbuf.c b/lib/extendbuf.c
new file mode 100644
index 0000000..e6e9103
--- /dev/null
+++ b/lib/extendbuf.c
@@ -0,0 +1,122 @@
+/* extendbuf.c -- manage a dynamically-allocated buffer
+
+ Copyright 2004, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* Written by James Yougnman <jay@gnu.org>. */
+
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <assert.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* gnulib headers. */
+#include "xalloc.h"
+
+/* find headers. */
+#include "extendbuf.h"
+
+
+/* We initially use a small default size to ensure that this code
+ * gets exercised.
+ */
+#ifndef SIZE_DEFAULT
+# define SIZE_DEFAULT 16
+#endif
+
+static size_t
+decide_size (size_t current, size_t wanted)
+{
+ size_t newsize;
+
+ if (0 == current)
+ newsize = SIZE_DEFAULT;
+ else
+ newsize = current;
+
+ while (newsize < wanted)
+ {
+ if (2 * newsize < newsize)
+ return wanted;
+ newsize *= 2;
+ }
+ return newsize;
+}
+
+
+void *
+extendbuf (void* existing, size_t wanted, size_t *allocated)
+{
+ int saved_errno;
+ size_t newsize;
+ void *result; /* leave uninitialized to allow static code checkers to identify bugs */
+
+ saved_errno = errno;
+
+ assert (wanted > 0u);
+ newsize = decide_size (*allocated, wanted);
+
+ if ( (*allocated) == 0 )
+ {
+ /* Sanity check: If there is no existing allocation size, there
+ * must be no existing allocated buffer.
+ */
+ assert (NULL == existing);
+
+ (*allocated) = newsize;
+ result = malloc (newsize);
+ }
+ else
+ {
+ if (newsize != (*allocated) )
+ {
+ (*allocated) = newsize;
+ result = realloc (existing, newsize);
+ if (NULL == result)
+ {
+ saved_errno = errno;
+ }
+ }
+ else
+ {
+ result = existing;
+ }
+ }
+
+ if (result)
+ {
+ /* malloc () or realloc () may have changed errno, but in the
+ success case we want to preserve the previous value.
+ */
+ errno = saved_errno;
+ }
+ return result;
+}
+
+
+void *
+xextendbuf (void* existing, size_t wanted, size_t *allocated)
+{
+ void *p = extendbuf (existing, wanted, allocated);
+ if (NULL == p)
+ {
+ free (existing);
+ xalloc_die ();
+ }
+ return p;
+}
diff --git a/lib/extendbuf.h b/lib/extendbuf.h
new file mode 100644
index 0000000..6727af1
--- /dev/null
+++ b/lib/extendbuf.h
@@ -0,0 +1,26 @@
+/* extendbuf.h -- Manage a dynamically-alloicated buffer
+
+ Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef INC_EXTENDBUF_H
+#define INC_EXTENDBUF_H 1
+
+void *extendbuf(void* existing, size_t wanted, size_t *allocated);
+void *xextendbuf(void* existing, size_t wanted, size_t *allocated);
+
+
+#endif
diff --git a/lib/fdleak.c b/lib/fdleak.c
new file mode 100644
index 0000000..2e6c9a9
--- /dev/null
+++ b/lib/fdleak.c
@@ -0,0 +1,383 @@
+/* fdleak.c -- detect file descriptor leaks
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <assert.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <poll.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#if HAVE_GETRLIMIT
+# include <sys/resource.h>
+#endif
+#include <unistd.h>
+
+/* gnulib headers. */
+#include "cloexec.h"
+#include "dirent-safer.h"
+#include "error.h"
+#include "fcntl--.h"
+#include "gettext.h"
+
+/* find headers. */
+#include "extendbuf.h"
+#include "fdleak.h"
+#include "safe-atoi.h"
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#endif
+#ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+#else
+/* See locate.c for explanation as to why not use (String) */
+# define N_(String) String
+#endif
+
+/* In order to detect FD leaks, we take a snapshot of the open
+ * file descriptors which are not FD_CLOEXEC when the program starts.
+ * When the program exits, we discover if there are any new
+ * file descriptors which aren't FD_CLOEXEC.
+ */
+static int *non_cloexec_fds;
+static size_t num_cloexec_fds;
+
+
+/* Determine the value of the largest open fd, on systems that
+ * offer /proc/self/fd. */
+static int
+get_proc_max_fd (void)
+{
+ const char *path = "/proc/self/fd";
+ int maxfd = -1;
+ /* We don't use readdir_r, because we cannot trust pathconf
+ * to tell us the maximum possible length of a path in
+ * a given directory (the manpage for readdir_r claims this
+ * is the approved method, but the manpage for pathconf indicates
+ * that _PC_NAME_MAX is not an upper limit). */
+ DIR *dir = opendir_safer (path);
+ if (dir)
+ {
+ int good = 0;
+ struct dirent *dent;
+
+ while ((dent=readdir (dir)) != NULL)
+ {
+ if (dent->d_name[0] != '.'
+ || (dent->d_name[0] != 0
+ && dent->d_name[1] != 0 && dent->d_name[1] != '.'))
+ {
+ const int fd = safe_atoi (dent->d_name, literal_quoting_style);
+ if (fd > maxfd)
+ maxfd = fd;
+ good = 1;
+ }
+ }
+ closedir (dir);
+ if (good)
+ return maxfd;
+ }
+ return -1;
+}
+
+
+
+/* Estimate the value of the largest possible file descriptor */
+static int
+get_max_fd (void)
+{
+ struct rlimit fd_limit;
+ long open_max;
+
+ open_max = get_proc_max_fd ();
+ if (open_max >= 0)
+ return open_max;
+
+ open_max = sysconf (_SC_OPEN_MAX);
+ if (open_max == -1)
+ open_max = _POSIX_OPEN_MAX; /* underestimate */
+
+ /* We assume if RLIMIT_NOFILE is defined, all the related macros are, too. */
+#if defined HAVE_GETRLIMIT && defined RLIMIT_NOFILE
+ if (0 == getrlimit (RLIMIT_NOFILE, &fd_limit))
+ {
+ if (fd_limit.rlim_cur == RLIM_INFINITY)
+ return open_max;
+ else
+ return (int) fd_limit.rlim_cur;
+ }
+#endif
+ /* cannot determine the limit's value */
+ return open_max;
+}
+
+
+static int
+visit_open_fds (int fd_min, int fd_max,
+ int (*callback)(int, void*), void *cb_context)
+{
+ enum { MAX_POLL = 64 };
+ struct pollfd pf[MAX_POLL];
+ int rv = 0;
+
+ while (fd_min < fd_max)
+ {
+ int i;
+ int limit = fd_max - fd_min;
+ if (limit > MAX_POLL)
+ limit = MAX_POLL;
+
+ for (i=0; i<limit; i++)
+ {
+ pf[i].events = POLLIN|POLLOUT;
+ pf[i].revents = 0;
+ pf[i].fd = fd_min + i;
+ }
+ rv = poll (pf, limit, 0);
+ if (-1 == rv)
+ {
+ return -1;
+ }
+ else
+ {
+ int j;
+ for (j=0; j<limit; j++)
+ {
+ if (pf[j].revents != POLLNVAL)
+ {
+ if (0 != (rv = callback (pf[j].fd, cb_context)))
+ return rv;
+ }
+ }
+ }
+ fd_min += limit;
+ }
+ return 0;
+}
+
+static int
+fd_is_cloexec (int fd)
+{
+ const int flags = fcntl (fd, F_GETFD);
+ return flags & FD_CLOEXEC;
+}
+
+
+/* Faking closures in C is a bit of a pain. */
+struct remember_fd_context
+{
+ int *buf;
+ size_t used;
+ size_t allocated;
+};
+
+
+/* Record FD is it's not FD_CLOEXEC. */
+static int
+remember_fd_if_non_cloexec (int fd, void *context)
+{
+ if (fd_is_cloexec (fd))
+ {
+ return 0;
+ }
+ else
+ {
+ struct remember_fd_context * const p = context;
+ void *newbuf = extendbuf (p->buf,
+ sizeof (p->buf[0])*(p->used+1),
+ &(p->allocated));
+ if (newbuf)
+ {
+ p->buf = newbuf;
+ p->buf[p->used] = fd;
+ ++p->used;
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+}
+
+void
+remember_non_cloexec_fds (void)
+{
+ int max_fd = get_max_fd ();
+ struct remember_fd_context cb_data;
+ cb_data.buf = NULL;
+ cb_data.used = cb_data.allocated = 0;
+
+ if (max_fd < INT_MAX)
+ ++max_fd;
+ visit_open_fds (0, max_fd, remember_fd_if_non_cloexec, &cb_data);
+
+ non_cloexec_fds = cb_data.buf;
+ num_cloexec_fds = cb_data.used;
+}
+
+
+struct fd_leak_context
+{
+ const int *prev_buf;
+ size_t used;
+ size_t lookup_pos;
+ int leaked_fd;
+};
+
+/* FD is open and not close-on-exec.
+ * If it's not in the list of non-cloexec file descriptors we saw before, it's a leak.
+ */
+static int
+find_first_leak_callback (int fd, void *context)
+{
+ if (!fd_is_cloexec (fd))
+ {
+ struct fd_leak_context *p = context;
+ while (p->lookup_pos < p->used)
+ {
+ if (p->prev_buf[p->lookup_pos] < fd)
+ {
+ ++p->lookup_pos;
+ }
+ else if (p->prev_buf[p->lookup_pos] == fd)
+ {
+ /* FD was open and still is, it's not a leak. */
+ return 0;
+ }
+ else
+ {
+ break;
+ }
+ }
+ /* We come here if p->prev_buf[p->lookup_pos] > fd, or
+ if we ran out of items in the lookup table.
+ Either way, this is a leak. */
+ p->leaked_fd = fd;
+ return -1; /* No more callbacks needed. */
+ }
+ return 0;
+}
+
+
+static int
+find_first_leaked_fd (const int* prev_non_cloexec_fds, size_t n)
+{
+ struct fd_leak_context context;
+ int max_fd = get_max_fd ();
+
+ if (max_fd < INT_MAX)
+ ++max_fd;
+ context.prev_buf = prev_non_cloexec_fds;
+ context.used = n;
+ context.lookup_pos = 0;
+ context.leaked_fd = -1;
+ visit_open_fds (0, max_fd, find_first_leak_callback, &context);
+ return context.leaked_fd;
+}
+
+/* Determine if O_CLOEXEC actually works (Savannah bug #29435:
+ fd_is_cloexec () does not work on Fedora buildhosts).
+ */
+static bool
+o_cloexec_works (void)
+{
+ bool result = false;
+ int fd = open ("/", O_RDONLY|O_CLOEXEC);
+ if (fd >= 0)
+ {
+ result = fd_is_cloexec (fd);
+ close (fd);
+ }
+ return result;
+}
+
+
+int
+open_cloexec (const char *path, int flags, ...)
+{
+ int fd;
+ mode_t mode = 0;
+ static bool cloexec_works = false;
+ static bool cloexec_status_known = false;
+
+ if (flags & O_CREAT)
+ {
+ /* this code is copied from gnulib's open-safer.c. */
+ va_list ap;
+ va_start (ap, flags);
+
+ /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4
+ creates crashing code when 'mode_t' is smaller than 'int'. */
+ mode = va_arg (ap, PROMOTED_MODE_T);
+
+ va_end (ap);
+ }
+
+ /* Kernels usually ignore open flags they don't recognise, so it
+ * is possible this program was built against a library which
+ * defines O_CLOEXEC, but is running on a kernel that (silently)
+ * does not recognise it. We figure this out by just trying it,
+ * once.
+ */
+ if (!cloexec_status_known)
+ {
+ cloexec_works = o_cloexec_works ();
+ cloexec_status_known = true;
+ }
+ fd = open (path, flags|O_CLOEXEC, mode);
+ if ((fd >= 0) && !(O_CLOEXEC && cloexec_works))
+ {
+ set_cloexec_flag (fd, true);
+ }
+ return fd;
+}
+
+void
+forget_non_cloexec_fds (void)
+{
+ free (non_cloexec_fds);
+ non_cloexec_fds = NULL;
+ num_cloexec_fds = 0;
+}
+
+
+void
+complain_about_leaky_fds (void)
+{
+ int no_leaks = 1;
+ const int leaking_fd = find_first_leaked_fd (non_cloexec_fds, num_cloexec_fds);
+
+ if (leaking_fd >= 0)
+ {
+ no_leaks = 0;
+ error (0, 0,
+ _("File descriptor %d will leak; please report this as a bug, "
+ "remembering to include a detailed description of the simplest "
+ "way to reproduce this problem."),
+ leaking_fd);
+ }
+ assert (no_leaks);
+}
diff --git a/lib/fdleak.h b/lib/fdleak.h
new file mode 100644
index 0000000..8584d8f
--- /dev/null
+++ b/lib/fdleak.h
@@ -0,0 +1,22 @@
+/* fdleak.h -- detect file descriptor leaks
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+void remember_non_cloexec_fds (void);
+void forget_non_cloexec_fds (void);
+void complain_about_leaky_fds (void);
+
+int open_cloexec(const char *path, int flags, ...);
diff --git a/lib/findutils-version.c b/lib/findutils-version.c
new file mode 100644
index 0000000..9704f95
--- /dev/null
+++ b/lib/findutils-version.c
@@ -0,0 +1,59 @@
+/* findutils-version.c -- show version information for findutils
+ Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers would go here if we needed any. */
+
+/* gnulib headers. */
+#include "gettext.h"
+#include "version-etc.h"
+
+/* find headers. */
+#include "findutils-version.h"
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#endif
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this. */
+# define program_name program_invocation_name
+#endif
+
+extern char *program_name;
+const char *version_string = VERSION;
+
+void
+display_findutils_version (const char *official_name)
+{
+ /* We use official_name rather than program name in the version
+ * information. This is deliberate, it is specified by the
+ * GNU coding standard.
+ */
+ fflush (stderr);
+ version_etc (stdout,
+ official_name, PACKAGE_NAME, version_string,
+ _("Eric B. Decker"),
+ _("James Youngman"),
+ _("Kevin Dalley"),
+ (const char*) NULL);
+}
diff --git a/lib/findutils-version.h b/lib/findutils-version.h
new file mode 100644
index 0000000..e73df79
--- /dev/null
+++ b/lib/findutils-version.h
@@ -0,0 +1,27 @@
+/* findutils-version.h -- show version information for findutils
+ Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * display_findutils_version displays GNU coding standard compliant
+ * version information.
+ *
+ * official_name Official name of the program, for example
+ * "find" or "xargs" (as opposed to "/bin/find"
+ * or gfind).
+ *
+ */
+void display_findutils_version(const char *official_name);
diff --git a/lib/forcefindlib.c b/lib/forcefindlib.c
new file mode 100644
index 0000000..82999b6
--- /dev/null
+++ b/lib/forcefindlib.c
@@ -0,0 +1,47 @@
+/* Ensures that the FINDLIB_REPLACE_FUNCS macro in configure.in works
+ Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+/* Written by James Youngman. */
+
+
+#include <config.h>
+
+
+extern void forcefindlib (void); /* prevent GCC warning... */
+
+
+
+/* forcefindlib
+ *
+ * This function exists only to be pulled into libfind.a by the
+ * FINDLIB_REPLACE_FUNCS macro in configure.in. We already have
+ * AC_REPLACE_FUNCS, but that adds to LIBOBJS, and that's a gnulib thing
+ * in the case of findutils. Hence we have out own library of replacement
+ * functions which aren't in gnulib (or aren't in it any more). An example
+ * of this is waitpid(). I develop on a system that doesn't
+ * lack waitpid, for example. Therefore FINDLIB_REPLACE_FUNCS(waitpid)
+ * never puts waitpid.o into FINDLIBOBJS. Hence, to ensure that these
+ * macros are tested every time, we use FINDLIB_REPLACE_FUNCS on a function
+ * that never exists anywhere, so always needs to be pulled in. That function
+ * is forcefindlib().
+ */
+void
+forcefindlib (void)
+{
+ /* does nothing, exists only to ensure that FINDLIB_REPLACE_FUNCS works. */
+}
diff --git a/lib/listfile.c b/lib/listfile.c
new file mode 100644
index 0000000..01a4ed7
--- /dev/null
+++ b/lib/listfile.c
@@ -0,0 +1,529 @@
+/* listfile.c -- display a long listing of a file
+ Copyright (C) 1991, 1993, 2000, 2004, 2005, 2007, 2008, 2010, 2011
+ Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <alloca.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <locale.h>
+#include <pwd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h> /* for readlink() */
+
+/* gnulib headers. */
+#include "areadlink.h"
+#include "error.h"
+#include "filemode.h"
+#include "human.h"
+#include "mbswidth.h"
+#include "idcache.h"
+#include "pathmax.h"
+#include "stat-size.h"
+#include "gettext.h"
+
+/* find headers. */
+#include "listfile.h"
+
+/* Since major is a function on SVR4, we can't use `ifndef major'. */
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#define HAVE_MAJOR
+#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#define HAVE_MAJOR
+#endif
+
+#ifdef major /* Might be defined in sys/types.h. */
+#define HAVE_MAJOR
+#endif
+#ifndef HAVE_MAJOR
+#define major(dev) (((dev) >> 8) & 0xff)
+#define minor(dev) ((dev) & 0xff)
+#endif
+#undef HAVE_MAJOR
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#endif
+#ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+#else
+/* See locate.c for explanation as to why not use (String) */
+# define N_(String) String
+#endif
+
+static bool print_name (register const char *p, FILE *stream, int literal_control_chars);
+
+/* We have some minimum field sizes, though we try to widen these fields on systems
+ * where we discover examples where the field width we started with is not enough. */
+static int inode_number_width = 9;
+static int block_size_width = 6;
+static int nlink_width = 3;
+static int owner_width = 8;
+static int group_width = 8;
+/* We don't print st_author even if the system has it. */
+static int major_device_number_width = 3;
+static int minor_device_number_width = 3;
+static int file_size_width = 8;
+
+static bool print_num(FILE *stream, unsigned long num, int *width)
+{
+ const int chars_out = fprintf (stream, "%*lu", *width, num);
+ if (chars_out >= 0)
+ {
+ if (*width < chars_out)
+ *width = chars_out;
+ return true;
+ }
+ return false;
+}
+
+
+/* NAME is the name to print.
+ RELNAME is the path to access it from the current directory.
+ STATP is the results of stat or lstat on it.
+ Use CURRENT_TIME to decide whether to print yyyy or hh:mm.
+ Use OUTPUT_BLOCK_SIZE to determine how to print file block counts
+ and sizes.
+ STREAM is the stdio stream to print on. */
+
+void
+list_file (const char *name,
+ int dir_fd,
+ char *relname,
+ const struct stat *statp,
+ time_t current_time,
+ int output_block_size,
+ int literal_control_chars,
+ FILE *stream)
+{
+ char modebuf[12];
+ struct tm const *when_local;
+ char const *user_name;
+ char const *group_name;
+ char hbuf[LONGEST_HUMAN_READABLE + 1];
+ bool output_good = true;
+ int chars_out;
+ int failed_at = 000;
+ int inode_field_width;
+
+#if HAVE_ST_DM_MODE
+ /* Cray DMF: look at the file's migrated, not real, status */
+ strmode (statp->st_dm_mode, modebuf);
+#else
+ strmode (statp->st_mode, modebuf);
+#endif
+
+ chars_out = fprintf (stream, "%*s", inode_number_width,
+ human_readable ((uintmax_t) statp->st_ino, hbuf,
+ human_ceiling,
+ 1u, 1u));
+ if (chars_out < 0)
+ {
+ output_good = false;
+ failed_at = 100;
+ }
+ else if (chars_out > inode_number_width)
+ {
+ inode_number_width = chars_out;
+ }
+ if (output_good)
+ {
+ if (EOF == putc(' ', stream))
+ {
+ output_good = false;
+ failed_at = 150;
+ }
+ chars_out = fprintf (stream, "%*s",
+ block_size_width,
+ human_readable ((uintmax_t) ST_NBLOCKS (*statp), hbuf,
+ human_ceiling,
+ ST_NBLOCKSIZE, output_block_size));
+ if (chars_out < 0)
+ {
+ output_good = false;
+ failed_at = 200;
+ }
+ else
+ {
+ if (chars_out > block_size_width)
+ block_size_width = chars_out;
+ }
+ }
+
+ if (output_good)
+ {
+ if (EOF == putc(' ', stream))
+ {
+ output_good = false;
+ failed_at = 250;
+ }
+ /* modebuf includes the space between the mode and the number of links,
+ as the POSIX "optional alternate access method flag". */
+ if (fprintf (stream, "%s%3lu ", modebuf, (unsigned long) statp->st_nlink) < 0)
+ {
+ output_good = false;
+ failed_at = 300;
+ }
+ }
+
+ if (output_good)
+ {
+ if (EOF == putc(' ', stream))
+ {
+ output_good = false;
+ failed_at = 250;
+ }
+ user_name = getuser (statp->st_uid);
+ if (user_name)
+ {
+ int len = mbswidth (user_name, 0);
+ if (len > owner_width)
+ owner_width = len;
+ output_good = (fprintf (stream, "%-*s ", owner_width, user_name) >= 0);
+ if (!output_good)
+ failed_at = 400;
+ }
+ else
+ {
+ chars_out = fprintf (stream, "%-8lu ", (unsigned long) statp->st_uid);
+ if (chars_out > owner_width)
+ owner_width = chars_out;
+ output_good = (chars_out > 0);
+ if (!output_good)
+ failed_at = 450;
+ }
+ }
+
+ if (output_good)
+ {
+ group_name = getgroup (statp->st_gid);
+ if (group_name)
+ {
+ int len = mbswidth (group_name, 0);
+ if (len > group_width)
+ group_width = len;
+ output_good = (fprintf (stream, "%-*s ", group_width, group_name) >= 0);
+ if (!output_good)
+ failed_at = 500;
+ }
+ else
+ {
+ chars_out = fprintf (stream, "%-*lu",
+ group_width, (unsigned long) statp->st_gid);
+ if (chars_out > group_width)
+ group_width = chars_out;
+ output_good = (chars_out >= 0);
+ if (output_good)
+ {
+ if (EOF == putc(' ', stream))
+ {
+ output_good = false;
+ failed_at = 525;
+ }
+ }
+ else
+ {
+ if (!output_good)
+ failed_at = 550;
+ }
+ }
+ }
+
+ if (output_good)
+ {
+ if (S_ISCHR (statp->st_mode) || S_ISBLK (statp->st_mode))
+ {
+#ifdef HAVE_STRUCT_STAT_ST_RDEV
+ if (!print_num (stream,
+ (unsigned long) major (statp->st_rdev),
+ &major_device_number_width))
+ {
+ output_good = false;
+ failed_at = 600;
+ }
+ if (output_good)
+ {
+ if (fprintf (stream, ", ") < 0)
+ {
+ output_good = false;
+ failed_at = 625;
+ }
+ }
+ if (output_good)
+ {
+ if (!print_num (stream,
+ (unsigned long) minor (statp->st_rdev),
+ &minor_device_number_width))
+ {
+ output_good = false;
+ failed_at = 650;
+ }
+ }
+#else
+ if (fprintf (stream, "%*s %*s",
+ major_device_number_width,
+ minor_device_number_width) < 0)
+ {
+ output_good = false;
+ failed_at = 700;
+ }
+#endif
+ }
+ else
+ {
+ const int blocksize = output_block_size < 0 ? output_block_size : 1;
+ chars_out = fprintf (stream, "%*s",
+ file_size_width,
+ human_readable ((uintmax_t) statp->st_size, hbuf,
+ human_ceiling,
+ 1, blocksize));
+ if (chars_out < 0)
+ {
+ output_good = false;
+ failed_at = 800;
+ }
+ else
+ {
+ if (chars_out > file_size_width)
+ {
+ file_size_width = chars_out;
+ }
+ }
+ }
+ }
+
+ if (output_good)
+ {
+ if (EOF == putc(' ', stream))
+ {
+ output_good = false;
+ failed_at = 850;
+ }
+ }
+
+ if (output_good)
+ {
+ if ((when_local = localtime (&statp->st_mtime)))
+ {
+ char init_bigbuf[256];
+ char *buf = init_bigbuf;
+ size_t bufsize = sizeof init_bigbuf;
+
+ /* Use strftime rather than ctime, because the former can produce
+ locale-dependent names for the month (%b).
+
+ Output the year if the file is fairly old or in the future.
+ POSIX says the cutoff is 6 months old;
+ approximate this by 6*30 days.
+ Allow a 1 hour slop factor for what is considered "the future",
+ to allow for NFS server/client clock disagreement. */
+ char const *fmt =
+ ((current_time - 6 * 30 * 24 * 60 * 60 <= statp->st_mtime
+ && statp->st_mtime <= current_time + 60 * 60)
+ ? "%b %e %H:%M"
+ : "%b %e %Y");
+
+ while (!strftime (buf, bufsize, fmt, when_local))
+ buf = alloca (bufsize *= 2);
+
+ if (fprintf (stream, "%s ", buf) < 0)
+ {
+ output_good = false;
+ failed_at = 900;
+ }
+ }
+ else
+ {
+ /* The time cannot be represented as a local time;
+ print it as a huge integer number of seconds. */
+ int width = 12;
+
+ if (statp->st_mtime < 0)
+ {
+ char const *num = human_readable (- (uintmax_t) statp->st_mtime,
+ hbuf, human_ceiling, 1, 1);
+ int sign_width = width - strlen (num);
+ if (fprintf (stream, "%*s%s ",
+ sign_width < 0 ? 0 : sign_width, "-", num) < 0)
+ {
+ output_good = false;
+ failed_at = 1000;
+ }
+ }
+ else
+ {
+ if (fprintf (stream, "%*s ", width,
+ human_readable ((uintmax_t) statp->st_mtime, hbuf,
+ human_ceiling,
+ 1, 1)) < 0)
+ {
+ output_good = false;
+ failed_at = 1100;
+ }
+ }
+ }
+ }
+
+ if (output_good)
+ {
+ output_good = print_name (name, stream, literal_control_chars);
+ if (!output_good)
+ {
+ failed_at = 1200;
+ }
+ }
+
+ if (output_good)
+ {
+ if (S_ISLNK (statp->st_mode))
+ {
+ char *linkname = areadlinkat (dir_fd, relname);
+ if (linkname)
+ {
+ if (fputs (" -> ", stream) < 0)
+ {
+ output_good = false;
+ failed_at = 1300;
+ }
+ if (output_good)
+ {
+ output_good = print_name (linkname, stream, literal_control_chars);
+ if (!output_good)
+ {
+ failed_at = 1350;
+ }
+ }
+ }
+ else
+ {
+ /* POSIX requires in the case of find that if we issue a
+ * diagnostic we should have a nonzero status. However,
+ * this function doesn't have a way of telling the caller to
+ * do that. However, since this function is only used when
+ * processing "-ls", we're already using an extension.
+ */
+ error (0, errno, "%s", name);
+ }
+ free (linkname);
+ }
+ if (output_good)
+ {
+ if (EOF == putc ('\n', stream))
+ {
+ output_good = false;
+ if (!output_good)
+ {
+ failed_at = 1400;
+ }
+ }
+ }
+ }
+ if (!output_good)
+ {
+ error (EXIT_FAILURE, errno, _("Failed to write output (at stage %d)"), failed_at);
+ }
+}
+
+
+static bool
+print_name_without_quoting (const char *p, FILE *stream)
+{
+ return (fprintf (stream, "%s", p) >= 0);
+}
+
+
+static bool
+print_name_with_quoting (register const char *p, FILE *stream)
+{
+ register unsigned char c;
+
+ while ((c = *p++) != '\0')
+ {
+ int fprintf_result = -1;
+ switch (c)
+ {
+ case '\\':
+ fprintf_result = fprintf (stream, "\\\\");
+ break;
+
+ case '\n':
+ fprintf_result = fprintf (stream, "\\n");
+ break;
+
+ case '\b':
+ fprintf_result = fprintf (stream, "\\b");
+ break;
+
+ case '\r':
+ fprintf_result = fprintf (stream, "\\r");
+ break;
+
+ case '\t':
+ fprintf_result = fprintf (stream, "\\t");
+ break;
+
+ case '\f':
+ fprintf_result = fprintf (stream, "\\f");
+ break;
+
+ case ' ':
+ fprintf_result = fprintf (stream, "\\ ");
+ break;
+
+ case '"':
+ fprintf_result = fprintf (stream, "\\\"");
+ break;
+
+ default:
+ if (c > 040 && c < 0177)
+ {
+ if (EOF == putc (c, stream))
+ return false;
+ fprintf_result = 1; /* otherwise it's used uninitialized. */
+ }
+ else
+ {
+ fprintf_result = fprintf (stream, "\\%03o", (unsigned int) c);
+ }
+ }
+ if (fprintf_result < 0)
+ return false;
+ }
+ return true;
+}
+
+static bool print_name (register const char *p, FILE *stream, int literal_control_chars)
+{
+ if (literal_control_chars)
+ return print_name_without_quoting (p, stream);
+ else
+ return print_name_with_quoting (p, stream);
+}
diff --git a/lib/listfile.h b/lib/listfile.h
new file mode 100644
index 0000000..9ee71a2
--- /dev/null
+++ b/lib/listfile.h
@@ -0,0 +1,23 @@
+/* listfile.h -- display a long listing of a file
+ Copyright (C) 1991, 1993, 2000, 2008, 2010, 2011 Free Software
+ Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#if !defined LISTFILE_H
+# define LISTFILE_H
+void list_file (const char *name, int dir_fd, char *relname, const struct stat *statp, time_t current_time, int output_block_size, int literal_control_chars, FILE *stream);
+#endif
diff --git a/lib/printquoted.c b/lib/printquoted.c
new file mode 100644
index 0000000..ddc09e4
--- /dev/null
+++ b/lib/printquoted.c
@@ -0,0 +1,80 @@
+/* printquoted.c -- print a specified string with any necessary quoting.
+
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005,
+ 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <stdio.h>
+#include <stdlib.h>
+
+/* gnulib headers. */
+#include "xalloc.h"
+
+/* find headers. */
+#include "printquoted.h"
+
+/*
+ * Print S according to the format FORMAT, but if the destination is a tty,
+ * convert any potentially-dangerous characters. The logic in this function
+ * was taken from ls.c in coreutils (at Sun Jun 5 20:42:51 2005 UTC).
+ */
+int
+print_quoted (FILE *fp,
+ const struct quoting_options *qopts,
+ bool dest_is_tty,
+ const char *format,
+ const char *s)
+{
+ int rv;
+
+ if (dest_is_tty)
+ {
+ char smallbuf[BUFSIZ];
+ size_t len = quotearg_buffer (smallbuf, sizeof smallbuf, s, -1, qopts);
+ char *buf;
+ if (len < sizeof smallbuf)
+ buf = smallbuf;
+ else
+ {
+ /* The original coreutils code uses alloca(), but I don't
+ * want to take on the anguish of introducing alloca() to
+ * 'find'.
+ * XXX: newsflash: we already have alloca().
+ */
+ buf = xmalloc (len + 1);
+ quotearg_buffer (buf, len + 1, s, -1, qopts);
+ }
+
+ /* Replace any remaining funny characters with '?'. */
+ len = qmark_chars (buf, len);
+
+ rv = fprintf (fp, format, buf); /* Print the quoted version */
+ if (buf != smallbuf)
+ {
+ free (buf);
+ buf = NULL;
+ }
+ }
+ else
+ {
+ /* no need to quote things. */
+ rv = fprintf (fp, format, s);
+ }
+ return rv;
+}
diff --git a/lib/printquoted.h b/lib/printquoted.h
new file mode 100644
index 0000000..539de71
--- /dev/null
+++ b/lib/printquoted.h
@@ -0,0 +1,34 @@
+/* Print a string, appropriately quoted.
+
+ Copyright 1997, 1999, 2001, 2003, 2005, 2010, 2011 Free Software
+ Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined PRINTQUOTED_H
+# define PRINTQUOTED_H
+
+#include <stdbool.h>
+#include <stdio.h>
+
+#include "quote.h"
+#include "quotearg.h"
+
+
+size_t qmark_chars(char *buf, size_t len);
+int print_quoted (FILE *fp, const struct quoting_options *qopts, bool dest_is_tty, const char *format, const char *s);
+
+
+#endif
diff --git a/lib/qmark.c b/lib/qmark.c
new file mode 100644
index 0000000..2e7cd89
--- /dev/null
+++ b/lib/qmark.c
@@ -0,0 +1,220 @@
+/* qmark.c -- quote 'dangerous' filenames
+
+ Copyright (C) 2005, 2007, 2009, 2010, 2011 Free Software Foundation,
+ Inc.
+ Derived from courutils' ls.c:
+ Copyright (C) 85, 88, 90, 91, 1995-2005 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+/* gnulib headers would go here if any needed to be included. */
+
+/* find headers. */
+#include "printquoted.h"
+
+
+
+/*
+ This comment, IN_CTYPE_DOMAIN and ISPRINT were borrowed from
+ coreutils at Sun Jun 5 21:17:40 2005 UTC.
+
+ Jim Meyering writes:
+
+ "... Some ctype macros are valid only for character codes that
+ isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
+ using /bin/cc or gcc but without giving an ansi option). So, all
+ ctype uses should be through macros like ISPRINT... If
+ STDC_HEADERS is defined, then autoconf has verified that the ctype
+ macros don't need to be guarded with references to isascii. ...
+ Defining isascii to 1 should let any compiler worth its salt
+ eliminate the && through constant folding."
+
+ Bruno Haible adds:
+
+ "... Furthermore, isupper(c) etc. have an undefined result if c is
+ outside the range -1 <= c <= 255. One is tempted to write isupper(c)
+ with c being of type `char', but this is wrong if c is an 8-bit
+ character >= 128 which gets sign-extended to a negative value.
+ The macro ISUPPER protects against this as well."
+
+ (Actually that rule of ISUPPER is now taken by to_uchar).
+*/
+
+#if STDC_HEADERS
+# define IN_CTYPE_DOMAIN(c) 1
+#else
+# define IN_CTYPE_DOMAIN(c) isascii(c)
+#endif
+
+/* ISPRINT is defined in <sys/euc.h> on at least Solaris2.6 systems. */
+#undef ISPRINT
+#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
+
+
+
+
+
+/* Convert a possibly-signed character to an unsigned character. This is
+ * a bit safer than casting to unsigned char, since it catches some type
+ * errors that the cast doesn't.
+ *
+ * This code taken from coreutils' system.h header at
+ * Sun Jun 5 21:05:21 2005 UTC.
+ */
+static inline unsigned char to_uchar (char ch)
+{
+ return ch;
+}
+
+
+static size_t
+unibyte_qmark_chars (char *buf, size_t len)
+{
+ char *p = buf;
+ char const *plimit = buf + len;
+
+ while (p < plimit)
+ {
+ if (! ISPRINT (to_uchar (*p)))
+ *p = '?';
+ p++;
+ }
+ return len;
+}
+
+
+
+
+
+/* Scan BUF, replacing any dangerous-looking characters with question
+ * marks. This code is taken from the ls.c file in coreutils as at
+ * Sun Jun 5 20:51:54 2005 UTC.
+ *
+ * This function may shrink the buffer. Either way, the new length
+ * is returned.
+ */
+size_t
+qmark_chars (char *buf, size_t len)
+{
+ if (MB_CUR_MAX <= 1)
+ {
+ return unibyte_qmark_chars (buf, len);
+ }
+ else
+ {
+ char const *p = buf;
+ char const *plimit = buf + len;
+ char *q = buf;
+
+ while (p < plimit)
+ switch (*p)
+ {
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* These characters are printable ASCII characters. */
+ *q++ = *p++;
+ break;
+ default:
+ /* If we have a multibyte sequence, copy it until we
+ reach its end, replacing each non-printable multibyte
+ character with a single question mark. */
+ {
+ mbstate_t mbstate;
+ memset (&mbstate, 0, sizeof mbstate);
+ do
+ {
+ wchar_t wc;
+ size_t bytes;
+ int w;
+
+ bytes = mbrtowc (&wc, p, plimit - p, &mbstate);
+
+ if (bytes == (size_t) -1)
+ {
+ /* An invalid multibyte sequence was
+ encountered. Skip one input byte, and
+ put a question mark. */
+ p++;
+ *q++ = '?';
+ break;
+ }
+
+ if (bytes == (size_t) -2)
+ {
+ /* An incomplete multibyte character
+ at the end. Replace it entirely with
+ a question mark. */
+ p = plimit;
+ *q++ = '?';
+ break;
+ }
+
+ if (bytes == 0)
+ /* A null wide character was encountered. */
+ bytes = 1;
+
+ w = wcwidth (wc);
+ if (w >= 0)
+ {
+ /* A printable multibyte character.
+ Keep it. */
+ for (; bytes > 0; --bytes)
+ *q++ = *p++;
+ }
+ else
+ {
+ /* An unprintable multibyte character.
+ Replace it entirely with a question
+ mark. */
+ p += bytes;
+ *q++ = '?';
+ }
+ }
+ while (! mbsinit (&mbstate));
+ }
+ break;
+ }
+
+ /* The buffer may have shrunk. */
+ len = q - buf;
+ return len;
+ }
+}
diff --git a/lib/regexprops.c b/lib/regexprops.c
new file mode 100644
index 0000000..3409b4c
--- /dev/null
+++ b/lib/regexprops.c
@@ -0,0 +1,614 @@
+/* regexprops.c -- document the properties of the regular expressions
+ understood by gnulib.
+
+ Copyright 2005, 2007, 2010, 2011, 2015 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+/*
+ The output of this program is included in the GNU findutils source
+ distribution. The copying conditions for that file are generated
+ by the copying() function below.
+*/
+
+/* Written by James Youngman, <jay@gnu.org>. */
+
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers */
+#include <errno.h>
+#include <regex.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+/* gnulib headers */
+#include "progname.h"
+
+/* find headers */
+#include "regextype.h"
+
+static void
+output (const char *s, int escape)
+{
+ (void) escape;
+
+ fputs (s, stdout);
+}
+
+
+static void
+newline (void)
+{
+ output ("\n", 0);
+}
+
+static void
+content (const char *s)
+{
+ output (s, 1);
+}
+
+static void
+literal (const char *s)
+{
+ output (s, 0);
+}
+
+static void
+directive (const char *s)
+{
+ output (s, 0);
+}
+
+static void
+comment (const char *s)
+{
+ directive ("@c ");
+ literal (s);
+ newline ();
+}
+
+static void
+enum_item (const char *s)
+{
+ newline ();
+ directive ("@item ");
+ literal (s);
+ newline ();
+}
+
+static void
+begin_subsection (const char *name,
+ const char *next,
+ const char *prev,
+ const char *up)
+{
+ (void) next;
+ (void) prev;
+ (void) up;
+
+ newline ();
+
+ directive ("@node ");
+ content (name);
+ content (" regular expression syntax");
+ newline ();
+
+ directive ("@subsection ");
+ output ("@samp{", 0);
+ content (name);
+ output ("}", 0);
+ content (" regular expression syntax");
+ newline ();
+}
+
+static void
+begintable_markup (char const *markup)
+{
+ newline ();
+ directive ("@table ");
+ literal (markup);
+ newline ();
+}
+
+static void
+endtable ()
+{
+ newline ();
+ directive ("@end table");
+ newline ();
+}
+
+static void
+beginenum ()
+{
+ newline ();
+ directive ("@enumerate");
+ newline ();
+}
+
+static void
+endenum ()
+{
+ newline ();
+ directive ("@end enumerate");
+ newline ();
+}
+
+static void
+newpara ()
+{
+ content ("\n\n");
+}
+
+
+static void
+describe_regex_syntax (int options)
+{
+ newpara ();
+ content ("The character @samp{.} matches any single character");
+ if ( (options & RE_DOT_NEWLINE) == 0 )
+ {
+ content (" except newline");
+ }
+ if (options & RE_DOT_NOT_NULL)
+ {
+ if ( (options & RE_DOT_NEWLINE) == 0 )
+ content (" and");
+ else
+ content (" except");
+
+ content (" the null character");
+ }
+ content (". ");
+ newpara ();
+
+ if (!(options & RE_LIMITED_OPS))
+ {
+ begintable_markup ("@samp");
+ if (options & RE_BK_PLUS_QM)
+ {
+ enum_item ("\\+");
+ content ("indicates that the regular expression should match one"
+ " or more occurrences of the previous atom or regexp. ");
+ enum_item ("\\?");
+ content ("indicates that the regular expression should match zero"
+ " or one occurrence of the previous atom or regexp. ");
+ enum_item ("+ and ? ");
+ content ("match themselves. ");
+ }
+ else
+ {
+ enum_item ("+");
+ content ("indicates that the regular expression should match one"
+ " or more occurrences of the previous atom or regexp. ");
+ enum_item ("?");
+ content ("indicates that the regular expression should match zero"
+ " or one occurrence of the previous atom or regexp. ");
+ enum_item ("\\+");
+ literal ("matches a @samp{+}");
+ enum_item ("\\?");
+ literal ("matches a @samp{?}. ");
+ }
+ endtable ();
+ }
+
+ newpara ();
+
+ content ("Bracket expressions are used to match ranges of characters. ");
+ literal ("Bracket expressions where the range is backward, for example @samp{[z-a]}, are ");
+ if (options & RE_NO_EMPTY_RANGES)
+ content ("invalid");
+ else
+ content ("ignored");
+ content (". ");
+
+ if (options & RE_BACKSLASH_ESCAPE_IN_LISTS)
+ literal ("Within square brackets, @samp{\\} can be used to quote "
+ "the following character. ");
+ else
+ literal ("Within square brackets, @samp{\\} is taken literally. ");
+
+ if (options & RE_CHAR_CLASSES)
+ content ("Character classes are supported; for example "
+ "@samp{[[:digit:]]} will match a single decimal digit. ");
+ else
+ literal ("Character classes are not supported, so for example "
+ "you would need to use @samp{[0-9]} "
+ "instead of @samp{[[:digit:]]}. ");
+
+ if (options & RE_HAT_LISTS_NOT_NEWLINE)
+ {
+ literal ("Non-matching lists @samp{[^@dots{}]} do not ever match newline. ");
+ }
+ newpara ();
+ if (options & RE_NO_GNU_OPS)
+ {
+ content ("GNU extensions are not supported and so "
+ "@samp{\\w}, @samp{\\W}, @samp{\\<}, @samp{\\>}, @samp{\\b}, @samp{\\B}, @samp{\\`}, and @samp{\\'} "
+ "match "
+ "@samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively. ");
+ }
+ else
+ {
+ content ("GNU extensions are supported:");
+ beginenum ();
+ enum_item ("@samp{\\w} matches a character within a word");
+ enum_item ("@samp{\\W} matches a character which is not within a word");
+ enum_item ("@samp{\\<} matches the beginning of a word");
+ enum_item ("@samp{\\>} matches the end of a word");
+ enum_item ("@samp{\\b} matches a word boundary");
+ enum_item ("@samp{\\B} matches characters which are not a word boundary");
+ enum_item ("@samp{\\`} matches the beginning of the whole input");
+ enum_item ("@samp{\\'} matches the end of the whole input");
+ endenum ();
+ }
+
+ newpara ();
+
+
+ if (options & RE_NO_BK_PARENS)
+ {
+ literal ("Grouping is performed with parentheses @samp{()}. ");
+
+ if (options & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ literal ("An unmatched @samp{)} matches just itself. ");
+ }
+ else
+ {
+ literal ("Grouping is performed with backslashes followed by parentheses @samp{\\(}, @samp{\\)}. ");
+ }
+
+ if (options & RE_NO_BK_REFS)
+ {
+ content ("A backslash followed by a digit matches that digit. ");
+ }
+ else
+ {
+ literal ("A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis ");
+ if (options & RE_NO_BK_PARENS)
+ literal ("@samp{(}");
+ else
+ literal ("@samp{\\(}");
+ content (". ");
+ }
+
+
+ newpara ();
+ if (!(options & RE_LIMITED_OPS))
+ {
+ if (options & RE_NO_BK_VBAR)
+ literal ("The alternation operator is @samp{|}. ");
+ else
+ literal ("The alternation operator is @samp{\\|}. ");
+ }
+ newpara ();
+
+ if (options & RE_CONTEXT_INDEP_ANCHORS)
+ {
+ literal ("The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. ");
+ }
+ else
+ {
+ literal ("The character @samp{^} only represents the beginning of a string when it appears:");
+ beginenum ();
+ enum_item ("\nAt the beginning of a regular expression");
+ enum_item ("After an open-group, signified by ");
+ if (options & RE_NO_BK_PARENS)
+ {
+ literal ("@samp{(}");
+ }
+ else
+ {
+ literal ("@samp{\\(}");
+ }
+ newline ();
+ if (!(options & RE_LIMITED_OPS))
+ {
+ if (options & RE_NEWLINE_ALT)
+ enum_item ("After a newline");
+
+ if (options & RE_NO_BK_VBAR )
+ enum_item ("After the alternation operator @samp{|}");
+ else
+ enum_item ("After the alternation operator @samp{\\|}");
+ }
+ endenum ();
+
+ newpara ();
+ literal ("The character @samp{$} only represents the end of a string when it appears:");
+ beginenum ();
+ enum_item ("At the end of a regular expression");
+ enum_item ("Before a close-group, signified by ");
+ if (options & RE_NO_BK_PARENS)
+ {
+ literal ("@samp{)}");
+ }
+ else
+ {
+ literal ("@samp{\\)}");
+ }
+ if (!(options & RE_LIMITED_OPS))
+ {
+ if (options & RE_NEWLINE_ALT)
+ enum_item ("Before a newline");
+
+ if (options & RE_NO_BK_VBAR)
+ enum_item ("Before the alternation operator @samp{|}");
+ else
+ enum_item ("Before the alternation operator @samp{\\|}");
+ }
+ endenum ();
+ }
+ newpara ();
+ if (!(options & RE_LIMITED_OPS) )
+ {
+ if ((options & RE_CONTEXT_INDEP_OPS)
+ && !(options & RE_CONTEXT_INVALID_OPS))
+ {
+ literal ("The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression. ");
+ }
+ else
+ {
+ if (options & RE_BK_PLUS_QM)
+ literal ("@samp{\\*}, @samp{\\+} and @samp{\\?} ");
+ else
+ literal ("@samp{*}, @samp{+} and @samp{?} ");
+
+ if (options & RE_CONTEXT_INVALID_OPS)
+ {
+ content ("are special at any point in a regular expression except the following places, where they are not allowed:");
+ }
+ else
+ {
+ content ("are special at any point in a regular expression except:");
+ }
+
+ beginenum ();
+ enum_item ("At the beginning of a regular expression");
+ enum_item ("After an open-group, signified by ");
+ if (options & RE_NO_BK_PARENS)
+ {
+ literal ("@samp{(}");
+ }
+ else
+ {
+ literal ("@samp{\\(}");
+ }
+ if (!(options & RE_LIMITED_OPS))
+ {
+ if (options & RE_NEWLINE_ALT)
+ enum_item ("After a newline");
+
+ if (options & RE_NO_BK_VBAR)
+ enum_item ("After the alternation operator @samp{|}");
+ else
+ enum_item ("After the alternation operator @samp{\\|}");
+ }
+ endenum ();
+ }
+ }
+
+
+ newpara ();
+ if (options & RE_INTERVALS)
+ {
+ if (options & RE_NO_BK_BRACES)
+ {
+ literal ("Intervals are specified by @samp{@{} and @samp{@}}. ");
+ if (options & RE_INVALID_INTERVAL_ORD)
+ {
+ literal ("Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a\\@{1}");
+ }
+ else
+ {
+ literal ("Invalid intervals such as @samp{a@{1z} are not accepted. ");
+ }
+ }
+ else
+ {
+ literal ("Intervals are specified by @samp{\\@{} and @samp{\\@}}. ");
+ if (options & RE_INVALID_INTERVAL_ORD)
+ {
+ literal ("Invalid intervals are treated as literals, for example @samp{a\\@{1} is treated as @samp{a@{1}");
+ }
+ else
+ {
+ literal ("Invalid intervals such as @samp{a\\@{1z} are not accepted. ");
+ }
+ }
+
+ }
+
+ newpara ();
+ if (options & RE_NO_POSIX_BACKTRACKING)
+ {
+ content ("Matching succeeds as soon as the whole pattern is matched, meaning that the result may not be the longest possible match. ");
+ }
+ else
+ {
+ content ("The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. ");
+ }
+ newpara ();
+}
+
+
+static void
+copying (void)
+{
+ static const char *copy_para[]=
+ {
+ "Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006,"
+ ,"2007, 2009, 2010, 2011 Free Software Foundation, Inc."
+ ,""
+ ,"Permission is granted to copy, distribute and/or modify this document"
+ ,"under the terms of the GNU Free Documentation License, Version 1.3 or"
+ ,"any later version published by the Free Software Foundation; with no"
+ ,"Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts."
+ ,"A copy of the license is included in the ``GNU Free"
+ ,"Documentation License'' file as part of this distribution."
+ ""
+ ,NULL
+ };
+ const char **s = copy_para;
+ while (*s)
+ comment (*s++);
+}
+
+static int
+ignore (int ix, const unsigned int context)
+{
+ return 0 == (get_regex_type_context (ix) & context);
+}
+
+static void
+menu (unsigned int context)
+{
+ int i, options;
+ const char *name;
+
+ output ("@menu\n", 0);
+ for (i=0;
+ options = get_regex_type_flags (i),
+ name=get_regex_type_name (i);
+ ++i)
+ {
+ if (!ignore (i, context))
+ {
+ output ("* ", 0);
+ output (name, 0);
+ content (" regular expression syntax");
+ output ("::", 0);
+ newline ();
+ }
+ }
+ output ("@end menu\n", 0);
+}
+
+
+
+static const char *
+get_next (unsigned int ix, unsigned int context)
+{
+ const char *next;
+ while (get_regex_type_name (ix))
+ {
+ if (!ignore (ix, context))
+ {
+ next = get_regex_type_name (ix);
+ if (NULL == next)
+ return "";
+ else
+ return next;
+ }
+ ++ix;
+ }
+ return "";
+}
+
+
+static void
+describe_all (const char *contextname,
+ unsigned int context,
+ const char *up)
+{
+ const char *name, *next, *previous;
+ int options;
+ int i, parent;
+
+ copying ();
+ newline ();
+ literal ("@c this regular expression description is for: ");
+ literal (contextname);
+ newline ();
+ newline ();
+ menu (context);
+
+ previous = "";
+
+ for (i=0;
+ options = get_regex_type_flags (i),
+ name=get_regex_type_name (i);
+ ++i)
+ {
+ if (ignore (i, context))
+ {
+ fprintf (stderr,
+ "Skipping regexp type %s for context %s\n",
+ name, contextname);
+ name = previous;
+ continue;
+ }
+
+ next = get_next (i+1, context);
+ if (NULL == next)
+ next = "";
+ begin_subsection (name, next, previous, up);
+ parent = get_regex_type_synonym (i);
+ if (parent >= 0)
+ {
+ content ("This is a synonym for ");
+ content (get_regex_type_name (parent));
+ content (".");
+ }
+ else
+ {
+ describe_regex_syntax (options);
+ }
+ previous = name;
+ }
+}
+
+
+
+int
+main (int argc, char *argv[])
+{
+ const char *up = "";
+ unsigned int context = CONTEXT_ALL;
+ const char *contextname = "all";
+
+ if (argc)
+ set_program_name (argv[0]);
+ else
+ set_program_name ("regexprops");
+
+ if (argc > 1)
+ {
+ up = argv[1];
+ }
+ if (argc > 2)
+ {
+ contextname = argv[2];
+ if (0 == strcmp (contextname, "findutils"))
+ context = CONTEXT_FINDUTILS;
+ else if (0 == strcmp (contextname, "generic"))
+ context = CONTEXT_GENERIC;
+ else if (0 == strcmp (contextname, "all"))
+ context = CONTEXT_ALL;
+ else
+ {
+ fprintf (stderr, "Unexpected context %s",
+ contextname);
+ return 1;
+ }
+ }
+
+ describe_all (contextname, context, up);
+ return 0;
+}
diff --git a/lib/regextype.c b/lib/regextype.c
new file mode 100644
index 0000000..352ffd4
--- /dev/null
+++ b/lib/regextype.c
@@ -0,0 +1,162 @@
+
+/* regextype.c -- Decode the name of a regular expression syntax into am
+ option name.
+
+ Copyright 2005, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* Written by James Youngman, <jay@gnu.org>. */
+
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* gnulib headers. */
+#include "error.h"
+#include "gettext.h"
+#include "quote.h"
+#include "regex.h"
+#include "regextype.h"
+#include "xalloc.h"
+
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#endif
+#ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+#else
+/* See locate.c for explanation as to why not use (String) */
+# define N_(String) String
+#endif
+
+
+struct tagRegexTypeMap
+{
+ const char *name;
+ int context;
+ int option_val;
+};
+
+struct tagRegexTypeMap regex_map[] =
+ {
+ { "findutils-default", CONTEXT_FINDUTILS, RE_SYNTAX_EMACS|RE_DOT_NEWLINE },
+ { "awk", CONTEXT_ALL, RE_SYNTAX_AWK },
+ { "egrep", CONTEXT_ALL, RE_SYNTAX_EGREP },
+ { "ed", CONTEXT_GENERIC, RE_SYNTAX_ED },
+ { "emacs", CONTEXT_ALL, RE_SYNTAX_EMACS },
+ { "gnu-awk", CONTEXT_ALL, RE_SYNTAX_GNU_AWK },
+ { "grep", CONTEXT_ALL, RE_SYNTAX_GREP },
+ { "posix-awk", CONTEXT_ALL, RE_SYNTAX_POSIX_AWK },
+ { "posix-basic", CONTEXT_ALL, RE_SYNTAX_POSIX_BASIC },
+ { "posix-egrep", CONTEXT_ALL, RE_SYNTAX_POSIX_EGREP },
+ { "posix-extended", CONTEXT_ALL, RE_SYNTAX_POSIX_EXTENDED },
+ { "posix-minimal-basic", CONTEXT_GENERIC, RE_SYNTAX_POSIX_MINIMAL_BASIC },
+ { "sed", CONTEXT_GENERIC, RE_SYNTAX_SED },
+ /* ,{ "posix-common", CONTEXT_GENERIC, _RE_SYNTAX_POSIX_COMMON } */
+ };
+enum { N_REGEX_MAP_ENTRIES = sizeof (regex_map)/sizeof (regex_map[0]) };
+
+int
+get_regex_type (const char *s)
+{
+ unsigned i;
+ size_t msglen;
+ char *buf, *p;
+
+ msglen = 0u;
+ for (i=0u; i<N_REGEX_MAP_ENTRIES; ++i)
+ {
+ if (0 == strcmp (regex_map[i].name, s))
+ return regex_map[i].option_val;
+ else
+ msglen += strlen (quote (regex_map[i].name)) + 2u;
+ }
+
+ /* We didn't find a match for the type of regular expression that the
+ * user indicated they wanted. Tell them what the options are.
+ */
+ p = buf = xmalloc (1u + msglen);
+ for (i=0u; i<N_REGEX_MAP_ENTRIES; ++i)
+ {
+ if (i > 0u)
+ {
+ strcpy (p, ", ");
+ p += 2;
+ }
+ p += sprintf (p, "%s", quote (regex_map[i].name));
+ }
+
+ error (EXIT_FAILURE, 0,
+ _("Unknown regular expression type %s; valid types are %s."),
+ quote (s),
+ buf);
+ /*NOTREACHED*/
+ return -1;
+}
+
+
+const char *
+get_regex_type_name (unsigned int ix)
+{
+ if (ix < N_REGEX_MAP_ENTRIES)
+ return regex_map[ix].name;
+ else
+ return NULL;
+}
+
+int
+get_regex_type_flags (unsigned int ix)
+{
+ if (ix < N_REGEX_MAP_ENTRIES)
+ return regex_map[ix].option_val;
+ else
+ return -1;
+}
+
+unsigned int get_regex_type_context (unsigned int ix)
+{
+ if (ix < N_REGEX_MAP_ENTRIES)
+ return regex_map[ix].context;
+ else
+ return 0u;
+}
+
+int
+get_regex_type_synonym (unsigned int ix)
+{
+ unsigned i;
+ int flags;
+
+ if (ix >= N_REGEX_MAP_ENTRIES)
+ return -1;
+
+ flags = regex_map[ix].option_val;
+ for (i=0u; i<ix; ++i)
+ {
+ if (flags == regex_map[i].option_val)
+ {
+ return i;
+ }
+ }
+ return -1;
+}
diff --git a/lib/regextype.h b/lib/regextype.h
new file mode 100644
index 0000000..87a97da
--- /dev/null
+++ b/lib/regextype.h
@@ -0,0 +1,56 @@
+/* regextype.h -- Decode the name of a regular expression syntax.
+
+ Copyright 2005, 2010, 2011, 2015 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* Written by James Youngman <jay@gnu.org>.
+ */
+
+/* Translate a regular expression type name into an option mask.
+ * This could convert "grep" into RE_SYNTAX_GREP, for example.
+ * Return -1 if there is no match.
+ */
+int get_regex_type(const char *s);
+
+enum {
+ CONTEXT_FINDUTILS = 1u,
+ CONTEXT_GENERIC = 2u,
+ CONTEXT_ALL = CONTEXT_GENERIC|CONTEXT_FINDUTILS,
+};
+
+
+
+/* Returns the regex type name corresponding to index IX.
+ * Indexes start at 0. Returns NULL if IX is too large.
+ */
+const char * get_regex_type_name(unsigned int ix);
+
+
+/* Returns the option mask name corresponding to regular expresion
+ * type index IX. Indexes start at 0. Behaviour is undefined if IX
+ * has a value which would cause get_regex_type_name to return NULL.
+ */
+int get_regex_type_flags(unsigned int ix);
+
+/* If regular expression type IX (which is a regular expression type index) has
+ * one or more synonyms, return the index of one of them. Otherwise, return -1.
+ */
+int get_regex_type_synonym(unsigned int ix);
+
+/* Returns one of CONTEXT_FINDUTILS, CONTEXT_GENERIC or CONTEXT_ALL.
+ * This identifies whether this regular expression type index is relevant for,
+ * respectively, findutils, general callers, or all callers.
+ */
+unsigned int get_regex_type_context(unsigned int ix);
diff --git a/lib/safe-atoi.c b/lib/safe-atoi.c
new file mode 100644
index 0000000..45e64e9
--- /dev/null
+++ b/lib/safe-atoi.c
@@ -0,0 +1,91 @@
+/* safe-atoi.c -- checked string-to-int conversion.
+ Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+/* gnulib headers. */
+#include "error.h"
+#include "gettext.h"
+#include "quotearg.h"
+
+/* find headers. */
+#include "safe-atoi.h"
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#endif
+#ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+#else
+/* See locate.c for explanation as to why not use (String) */
+# define N_(String) String
+#endif
+
+
+int
+safe_atoi (const char *s, enum quoting_style style)
+{
+ long lval;
+ char *end;
+
+ errno = 0;
+ lval = strtol (s, &end, 10);
+ if ( (LONG_MAX == lval) || (LONG_MIN == lval) )
+ {
+ /* max/min possible value, or an error. */
+ if (errno == ERANGE)
+ {
+ /* too big, or too small. */
+ error (EXIT_FAILURE, errno, "%s", s);
+ }
+ else
+ {
+ /* not a valid number */
+ error (EXIT_FAILURE, errno, "%s", s);
+ }
+ /* Otherwise, we do a range chack against INT_MAX and INT_MIN
+ * below.
+ */
+ }
+
+ if (lval > INT_MAX || lval < INT_MIN)
+ {
+ /* The number was in range for long, but not int. */
+ errno = ERANGE;
+ error (EXIT_FAILURE, errno, "%s", s);
+ }
+ else if (*end)
+ {
+ error (EXIT_FAILURE, errno, _("Unexpected suffix %s on %s"),
+ quotearg_n_style (0, style, end),
+ quotearg_n_style (1, style, s));
+ }
+ else if (end == s)
+ {
+ error (EXIT_FAILURE, errno, _("Expected an integer: %s"),
+ quotearg_n_style (0, style, s));
+ }
+ return (int)lval;
+}
diff --git a/lib/safe-atoi.h b/lib/safe-atoi.h
new file mode 100644
index 0000000..4341a53
--- /dev/null
+++ b/lib/safe-atoi.h
@@ -0,0 +1,25 @@
+/* safe-atoi.h -- checked string-to-int conversion.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef SAFE_ATOI_H
+#define SAFE_ATOI_H 1
+
+#include "quotearg.h"
+
+int safe_atoi (const char *s, enum quoting_style style);
+
+#endif
diff --git a/lib/splitstring.c b/lib/splitstring.c
new file mode 100644
index 0000000..6874b33
--- /dev/null
+++ b/lib/splitstring.c
@@ -0,0 +1,65 @@
+/* splitstring.c -- split a const string into fields.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/*
+ * Written by James Youngman.
+ */
+/* config.h must be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <stdbool.h>
+#include <string.h>
+
+/* gnulib headers would go here. */
+
+/* find headers. */
+#include "splitstring.h"
+
+static size_t
+field_length (const char *str, const char *separators)
+{
+ /* if there are no separators, the whole input is one field. */
+ if (*separators)
+ {
+ const char *end = strpbrk (str, separators);
+ if (end)
+ return end - str;
+ }
+ return strlen (str);
+}
+
+
+bool
+splitstring(const char *s, const char *separators, bool first,
+ size_t *pos, size_t *len)
+{
+ if (first)
+ {
+ *pos = 0u;
+ *len = 0u;
+ }
+ else
+ {
+ *pos += *len; /* advance to the next field. */
+ if (s[*pos])
+ ++*pos; /* skip the separator */
+ else
+ return false; /* we reached the end. */
+ }
+ *len = field_length (&s[*pos], separators);
+ return true;
+}
diff --git a/lib/splitstring.h b/lib/splitstring.h
new file mode 100644
index 0000000..d977573
--- /dev/null
+++ b/lib/splitstring.h
@@ -0,0 +1,40 @@
+/* splitstring.h -- split a const string into fields.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+/*
+ * Written by James Youngman.
+ */
+
+/* Split a string into fields. The string is never modified.
+ *
+ * A false return value indicates that there are no more fields.
+ * Otherwise the next field is at the poisition indicated by *POS and
+ * has length *LEN.
+ *
+ * Set FIRST to true only on the first call for any given value of s.
+ * *POS and *LEN do not need to be initialized in this case.
+ * On subsequent calls, these values should be left at the values
+ * set by the last call.
+ *
+ * Any character in SEPARATORS is taken to be a field separator.
+ * Consecutive field separators are taken to indicate the presence of
+ * an empty field.
+ */
+#include <stdbool.h>
+#include <stddef.h>
+
+bool splitstring(const char *s, const char *separators,
+ bool first, size_t *pos, size_t *len);
diff --git a/lib/test_splitstring.c b/lib/test_splitstring.c
new file mode 100644
index 0000000..639a5bf
--- /dev/null
+++ b/lib/test_splitstring.c
@@ -0,0 +1,208 @@
+/* test_splitstring.c -- unit test for splitstring()
+ Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* config.h must always be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <stdio.h>
+#include <assert.h>
+
+/* gnulib headers would go here. */
+
+/* find headers. */
+#include "splitstring.h"
+
+static void
+assertEqualFunc(const char *file, int line, const char *label,
+ size_t expected, size_t got)
+{
+ if (expected != got)
+ fprintf(stderr, "%s line %d: %s: expected %lu, got %lu\n",
+ file, line, label, (unsigned long)expected, (unsigned long)got);
+}
+#define ASSERT_EQUAL(expected,got) \
+ do{ \
+ assertEqualFunc(__FILE__,__LINE__,"ASSERT_EQUAL",expected,got); \
+ assert (expected == got); \
+ } while (0);
+
+
+static void
+test_empty (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *empty = "";
+
+ result = splitstring (empty, ":", true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (0, len);
+ result = splitstring (empty, ":", false, &pos, &len);
+ assert (!result);
+}
+
+static void test_onefield (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *input = "aaa";
+
+ result = splitstring (input, ":", true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (3, len);
+ result = splitstring (input, ":", false, &pos, &len);
+ assert (!result);
+}
+
+static void test_not_colon (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *separators = "!";
+ const char *input = "aa!b";
+
+ result = splitstring (input, separators, true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (2, len);
+
+ result = splitstring (input, separators, false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (3, pos);
+ ASSERT_EQUAL (1, len);
+
+ result = splitstring (input, separators, false, &pos, &len);
+ assert (!result);
+}
+
+static void test_empty_back (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *input = "aa:";
+
+ result = splitstring (input, ":", true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (2, len);
+ result = splitstring (input, ":", false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (3, pos);
+ ASSERT_EQUAL (0, len);
+ result = splitstring (input, ":", false, &pos, &len);
+ assert (!result);
+}
+
+static void test_empty_front (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *input = ":aaa";
+
+ result = splitstring (input, ":", true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (0, len);
+ result = splitstring (input, ":", false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (1, pos);
+ ASSERT_EQUAL (3, len);
+ result = splitstring (input, ":", false, &pos, &len);
+ assert (!result);
+}
+
+static void test_twofields (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *input = "aaa:bb";
+
+ result = splitstring (input, ":", true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (3, len);
+ result = splitstring (input, ":", false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (4, pos);
+ ASSERT_EQUAL (2, len);
+ result = splitstring (input, ":", false, &pos, &len);
+ assert (!result);
+}
+
+static void test_twoseparators (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *input = "a:bb!c";
+
+ result = splitstring (input, ":!", true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (1, len);
+ result = splitstring (input, ":!", false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (2, pos);
+ ASSERT_EQUAL (2, len);
+ result = splitstring (input, ":!", false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (5, pos);
+ ASSERT_EQUAL (1, len);
+ result = splitstring (input, ":!", false, &pos, &len);
+ assert (!result);
+}
+
+static void test_consecutive_empty (void)
+{
+ size_t len, pos;
+ bool result;
+ const char *input = "a::b";
+ const char *separators = ":";
+
+ result = splitstring (input, separators, true, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (0, pos);
+ ASSERT_EQUAL (1, len);
+
+ result = splitstring (input, separators, false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (2, pos);
+ ASSERT_EQUAL (0, len);
+
+ result = splitstring (input, separators, false, &pos, &len);
+ assert (result);
+ ASSERT_EQUAL (3, pos);
+ ASSERT_EQUAL (1, len);
+
+ result = splitstring (input, separators, false, &pos, &len);
+ assert (!result);
+}
+
+int main (int argc, char *argv[])
+{
+ test_empty ();
+ test_onefield ();
+ test_not_colon ();
+ test_empty_back ();
+ test_empty_front ();
+ test_twofields ();
+ test_twoseparators ();
+ test_consecutive_empty ();
+ return 0;
+}
diff --git a/lib/unused-result.h b/lib/unused-result.h
new file mode 100644
index 0000000..a49b279
--- /dev/null
+++ b/lib/unused-result.h
@@ -0,0 +1,39 @@
+/* unused-result.h -- macros for ensuring callers don't ignore return values
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Taken from coreutils' fts_.h */
+#ifndef INC_UNUSED_RESULT_H
+# define INC_UNUSED_RESULT_H 1
+
+# ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+# define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+# define __GNUC_PREREQ(maj, min) 0
+# endif
+# endif
+
+# if __GNUC_PREREQ (3,4)
+# undef __attribute_warn_unused_result__
+# define __attribute_warn_unused_result__ \
+ __attribute__ ((__warn_unused_result__))
+# else
+# define __attribute_warn_unused_result__ /* empty */
+# endif
+
+#endif
diff --git a/lib/waitpid.c b/lib/waitpid.c
new file mode 100644
index 0000000..1d63fbd
--- /dev/null
+++ b/lib/waitpid.c
@@ -0,0 +1,79 @@
+/* Emulate waitpid on systems that just have wait.
+ Copyright 1994, 1995, 1998, 1999, 2010, 2011 Free Software
+ Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* config.h must always be included first. */
+#include <config.h>
+
+/* system headers. */
+#include <errno.h>
+
+
+/* TODO: replace this with gnulib's waitpid. */
+#if defined _MSC_VER || defined __MINGW32__
+/* Native Woe32 API. */
+#include <process.h>
+#else
+/* Unix API. */
+#include <sys/wait.h>
+#endif
+
+#define WAITPID_CHILDREN 8
+static pid_t waited_pid[WAITPID_CHILDREN];
+static int waited_status[WAITPID_CHILDREN];
+
+pid_t
+waitpid (pid_t pid, int *stat_loc, int options)
+{
+ int i;
+ pid_t p;
+
+ if (!options && (pid == -1 || 0 < pid))
+ {
+ /* If we have already waited for this child, return it immediately. */
+ for (i = 0; i < WAITPID_CHILDREN; i++)
+ {
+ p = waited_pid[i];
+ if (p && (p == pid || pid == -1))
+ {
+ waited_pid[i] = 0;
+ goto success;
+ }
+ }
+
+ /* The child has not returned yet; wait for it, accumulating status. */
+ for (i = 0; i < WAITPID_CHILDREN; i++)
+ if (! waited_pid[i])
+ {
+ p = wait (&waited_status[i]);
+ if (p < 0)
+ return p;
+ if (p == pid || pid == -1)
+ goto success;
+ waited_pid[i] = p;
+ }
+ }
+
+ /* We cannot emulate this wait call, e.g. because of too many children. */
+ errno = EINVAL;
+ return -1;
+
+success:
+ if (stat_loc)
+ *stat_loc = waited_status[i];
+ return p;
+}